Skip to content

Commit

Permalink
strats with sbi reset
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelgloeckler committed Jan 28, 2025
1 parent 883ce20 commit c5f57b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/circular_import_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ def import_first_function(module_name: str):
else:
pass


def reset_environment():
"""This is a helper which resets the environment by deleting all modules associated with the sbi package."""
"""This is a helper which resets the environment by deleting all sbi modules."""

for module_name in list(sys.modules.keys()):
if module_name.startswith("sbi"):
print(f"Deleting {module_name}")
del sys.modules[module_name]


Expand Down Expand Up @@ -100,3 +103,5 @@ def test_for_circular_imports():
assert len(errors) == 0, "\n".join(errors)

reset_environment()


0 comments on commit c5f57b4

Please sign in to comment.