Move enum import and adjust comments.

This commit is contained in:
Florian Bruhin 2015-08-08 15:25:10 +02:00
parent 84fdba129a
commit 4e21d1d77b
1 changed files with 6 additions and 6 deletions

View File

@ -9,6 +9,12 @@ import pytest
from _pytest.mark import MarkDecorator, MarkerError from _pytest.mark import MarkDecorator, MarkerError
from py._code.code import TerminalRepr 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 _pytest
import pluggy import pluggy
@ -980,12 +986,6 @@ def _idval(val, argname, idx, idfn):
except Exception: except Exception:
pass pass
try:
import enum
except ImportError:
# Only available in Python 3.4+
enum = None
if isinstance(val, (float, int, str, bool, NoneType)): if isinstance(val, (float, int, str, bool, NoneType)):
return str(val) return str(val)
elif isinstance(val, REGEX_TYPE): elif isinstance(val, REGEX_TYPE):