From 7d1c697c306929e5a02dd34268dba865dfdd33b6 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 14 Jul 2019 18:26:05 +0300 Subject: [PATCH] Remove a no-longer-needed check if enum is available Not needed since 4d49ba65297102110ae8aeecdb3b82b23a231fba. --- src/_pytest/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 8e5a02292..82ed8b9cf 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1164,7 +1164,7 @@ def _idval(val, argname, idx, idfn, item, config): return str(val) elif isinstance(val, REGEX_TYPE): return ascii_escaped(val.pattern) - elif enum is not None and isinstance(val, enum.Enum): + elif isinstance(val, enum.Enum): return str(val) elif (inspect.isclass(val) or inspect.isfunction(val)) and hasattr(val, "__name__"): return val.__name__