Remove _pytest.compat.NoneType

This commit is contained in:
Daniel Hahler 2019-05-28 18:16:00 +02:00
parent 6061ecf95a
commit 220a2a1bc9
2 changed files with 1 additions and 3 deletions

View File

@ -37,7 +37,6 @@ if _PY3:
else:
from funcsigs import signature, Parameter as Parameter
NoneType = type(None)
NOTSET = object()
PY35 = sys.version_info[:2] >= (3, 5)

View File

@ -31,7 +31,6 @@ from _pytest.compat import getlocation
from _pytest.compat import is_generator
from _pytest.compat import isclass
from _pytest.compat import isfunction
from _pytest.compat import NoneType
from _pytest.compat import NOTSET
from _pytest.compat import REGEX_TYPE
from _pytest.compat import safe_getattr
@ -1192,7 +1191,7 @@ def _idval(val, argname, idx, idfn, item, config):
if isinstance(val, STRING_TYPES):
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)
elif isinstance(val, REGEX_TYPE):
return ascii_escaped(val.pattern)