commit
a930ca0b45
|
@ -37,7 +37,6 @@ if _PY3:
|
||||||
else:
|
else:
|
||||||
from funcsigs import signature, Parameter as Parameter
|
from funcsigs import signature, Parameter as Parameter
|
||||||
|
|
||||||
NoneType = type(None)
|
|
||||||
NOTSET = object()
|
NOTSET = object()
|
||||||
|
|
||||||
PY35 = sys.version_info[:2] >= (3, 5)
|
PY35 = sys.version_info[:2] >= (3, 5)
|
||||||
|
|
|
@ -31,7 +31,6 @@ from _pytest.compat import getlocation
|
||||||
from _pytest.compat import is_generator
|
from _pytest.compat import is_generator
|
||||||
from _pytest.compat import isclass
|
from _pytest.compat import isclass
|
||||||
from _pytest.compat import isfunction
|
from _pytest.compat import isfunction
|
||||||
from _pytest.compat import NoneType
|
|
||||||
from _pytest.compat import NOTSET
|
from _pytest.compat import NOTSET
|
||||||
from _pytest.compat import REGEX_TYPE
|
from _pytest.compat import REGEX_TYPE
|
||||||
from _pytest.compat import safe_getattr
|
from _pytest.compat import safe_getattr
|
||||||
|
@ -1192,7 +1191,7 @@ def _idval(val, argname, idx, idfn, item, config):
|
||||||
|
|
||||||
if isinstance(val, STRING_TYPES):
|
if isinstance(val, STRING_TYPES):
|
||||||
return _ascii_escaped_by_config(val, config)
|
return _ascii_escaped_by_config(val, config)
|
||||||
elif isinstance(val, (float, int, bool, NoneType)):
|
elif val is None or isinstance(val, (float, int, bool)):
|
||||||
return str(val)
|
return str(val)
|
||||||
elif isinstance(val, REGEX_TYPE):
|
elif isinstance(val, REGEX_TYPE):
|
||||||
return ascii_escaped(val.pattern)
|
return ascii_escaped(val.pattern)
|
||||||
|
|
Loading…
Reference in New Issue