Skip to content

Commit 12c77cd

Browse files
committed
Clear env for test
Signed-off-by: Frankie Siino <fsiino@nvidia.com>
1 parent 657b1df commit 12c77cd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/unit_tests/test_global_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,10 @@ def test_find_open_port_raises_after_max_retries(self, monkeypatch: MonkeyPatch)
413413

414414
def test_get_global_config_dict_prevents_port_conflict_with_head_server(self, monkeypatch: MonkeyPatch) -> None:
415415
"""Integration test: verify that child servers never get the head server port."""
416+
# Clear any lingering env vars.
417+
monkeypatch.delenv(NEMO_GYM_CONFIG_DICT_ENV_VAR_NAME, raising=False)
418+
monkeypatch.setattr(nemo_gym.global_config, "_GLOBAL_CONFIG_DICT", None)
419+
416420
exists_mock = MagicMock()
417421
exists_mock.return_value = False
418422
monkeypatch.setattr(nemo_gym.global_config.Path, "exists", exists_mock)

0 commit comments

Comments
 (0)