Skip to content

Commit

Permalink
Add tests for clean_env
Browse files Browse the repository at this point in the history
  • Loading branch information
baldassarreFe committed Jul 25, 2024
1 parent 961f842 commit b3a2ecd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions submitit/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,8 @@ def test_clean_env() -> None:
assert not _get_env()
assert len(_get_env()) == len(base) + 2
assert _get_env() == base

with utils.environment_variables(MASTER_PORT=42, BLABLA=314):
with helpers.clean_env(extra_names=("BLABLA",)):
assert "MASTER_PORT" not in os.environ
assert "BLABLA" not in os.environ

0 comments on commit b3a2ecd

Please sign in to comment.