Skip to content

Commit c2aae22

Browse files
committed
Fix tests/feature/test_cucumber_json.py::test_step_trace
This test was failing when run as part of the entire test suite and passing when run on its own. When the first part of the expected[0].id path was changed from test_step_trace0 to test_step_trace1, the results reversed - it passed as part of the entire suite and failed on its own. This behavior was not observed prior to the async changed. I suspect that this is caused by the addition of test_async_steps.py::test_step_trace, which caused this to no longer be the first test with the name `test_step_trace` to run as part of the entire suite. Since there are several other tests with the same name, it seems like the best course here would be to ensure that this test has a unique name so that it is more resilient to ordering.
1 parent ec28d7c commit c2aae22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/feature/test_cucumber_json.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __eq__(self, other: object) -> bool:
2929
return isinstance(other, self.type) if self.type else True
3030

3131

32-
def test_step_trace(pytester):
32+
def test_cucumber_json_step_trace(pytester):
3333
"""Test step trace."""
3434
pytester.makefile(
3535
".ini",
@@ -222,7 +222,7 @@ def test_passing_outline():
222222
"name": "Passing outline",
223223
},
224224
],
225-
"id": os.path.join("test_step_trace0", "test.feature"),
225+
"id": os.path.join("test_cucumber_json_step_trace0", "test.feature"),
226226
"keyword": "Feature",
227227
"line": 2,
228228
"name": "One passing scenario, one failing scenario",

0 commit comments

Comments
 (0)