Skip to content

Commit

Permalink
Update explanation of _reset
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschulz-COL committed Oct 23, 2023
1 parent 508b3ca commit 078c5e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vizro-core/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
@pytest.fixture(autouse=True)
def reset_managers():
# this ensures that the managers are reset before and after each test
# in principle clearing after every test should suffice, but this serves as a safety measure
# there are two tests in `test_get_action_loop_components.py` that fail without this
Vizro._clear_state()
# the reset BEFORE all tests is important because at pytest test collection, fixtures are evaluated and hence
# the model_manager may be populated with models from other tests
Vizro._reset()
yield
Vizro._clear_state()
Vizro._reset()


@pytest.fixture()
Expand Down

0 comments on commit 078c5e6

Please sign in to comment.