Remove _pytest.compat.NoneType (#5326)

Remove _pytest.compat.NoneType
This commit is contained in:
Bruno Oliveira 2019-05-28 19:58:17 -03:00 committed by GitHub
commit a930ca0b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)