Move enum import and adjust comments.
This commit is contained in:
parent
84fdba129a
commit
4e21d1d77b
|
@ -9,6 +9,12 @@ import pytest
|
|||
from _pytest.mark import MarkDecorator, MarkerError
|
||||
from py._code.code import TerminalRepr
|
||||
|
||||
try:
|
||||
import enum
|
||||
except ImportError: # pragma: no cover
|
||||
# Only available in Python 3.4+ or as a backport
|
||||
enum = None
|
||||
|
||||
import _pytest
|
||||
import pluggy
|
||||
|
||||
|
@ -980,12 +986,6 @@ def _idval(val, argname, idx, idfn):
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
import enum
|
||||
except ImportError:
|
||||
# Only available in Python 3.4+
|
||||
enum = None
|
||||
|
||||
if isinstance(val, (float, int, str, bool, NoneType)):
|
||||
return str(val)
|
||||
elif isinstance(val, REGEX_TYPE):
|
||||
|
|
Loading…
Reference in New Issue