We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de9d116 commit ee7e1c9Copy full SHA for ee7e1c9
_pytest/fixtures.py
@@ -1145,11 +1145,10 @@ def _splitnode(cls, nodeid):
1145
return []
1146
sep = py.path.local.sep
1147
parts = nodeid.split(sep)
1148
- if parts:
1149
- last_part = parts[-1]
1150
- if '::' in last_part:
1151
- namespace_parts = last_part.split("::")
1152
- parts[-1:] = namespace_parts
+ last_part = parts[-1]
+ if '::' in last_part:
+ # Replace single last element 'test_foo.py::Bar::()' with multiple elements 'test_foo.py', 'Bar', '()'
+ parts[-1:] = last_part.split("::")
1153
return parts
1154
1155
@classmethod
0 commit comments