Remove redundant if, tidy if-body
This commit is contained in:
parent
de9d116a49
commit
ee7e1c94d2
|
@ -1145,11 +1145,10 @@ class FixtureManager:
|
||||||
return []
|
return []
|
||||||
sep = py.path.local.sep
|
sep = py.path.local.sep
|
||||||
parts = nodeid.split(sep)
|
parts = nodeid.split(sep)
|
||||||
if parts:
|
last_part = parts[-1]
|
||||||
last_part = parts[-1]
|
if '::' in last_part:
|
||||||
if '::' in last_part:
|
# Replace single last element 'test_foo.py::Bar::()' with multiple elements 'test_foo.py', 'Bar', '()'
|
||||||
namespace_parts = last_part.split("::")
|
parts[-1:] = last_part.split("::")
|
||||||
parts[-1:] = namespace_parts
|
|
||||||
return parts
|
return parts
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in New Issue