Skip to content

Commit c5d68ca

Browse files
committed
chore: Add an autouse fixture to clear the global params registry so parametrized and other param-using tests don't hit duplicate registration
1 parent 5a4f056 commit c5d68ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_options.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
# pylint: disable=protected-access
2525

2626

27+
@pytest.fixture(autouse=True)
28+
def _cleanup_params():
29+
"""Clear the global params registry so each test runs with a clean state."""
30+
params._params.clear()
31+
yield
32+
params._params.clear()
33+
34+
2735
@https_fn.on_call()
2836
def asamplefunction(_):
2937
return "hello world"

0 commit comments

Comments
 (0)