Fix encoding errors for parametrized tests with unicode parameters in py2

Fix #1085
This commit is contained in:
Bruno Oliveira
2015-09-29 17:57:49 -03:00
parent e9240f7eee
commit 8633c4cefd
2 changed files with 20 additions and 1 deletions

View File

@@ -1093,7 +1093,7 @@ def _idval(val, argname, idx, idfn):
# convertible to ascii, return it as an str() object instead
try:
return str(val)
except UnicodeDecodeError:
except UnicodeError:
# fallthrough
pass
return str(argname)+str(idx)