Skip to content

Commit 6d5eedb

Browse files
committed
Ensure clean environment for all env tests.
1 parent 8f58d71 commit 6d5eedb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/unit/test_environment.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
def test_options_address(monkeypatch: pytest.MonkeyPatch) -> None:
1111
try:
12+
monkeypatch.delenv(name=Options.ENV_SERVER_ADDRESS, raising=False)
1213
options: Options = Options()
1314
assert options.address == "localhost:1408"
1415

@@ -48,6 +49,7 @@ def test_options_req_timeout(monkeypatch: pytest.MonkeyPatch) -> None:
4849

4950
def test_options_ready_timeout(monkeypatch: pytest.MonkeyPatch) -> None:
5051
try:
52+
monkeypatch.delenv(name=Options.ENV_READY_TIMEOUT, raising=False)
5153
options: Options = Options()
5254
assert options.ready_timeout_seconds == 0
5355

@@ -66,6 +68,7 @@ def test_options_ready_timeout(monkeypatch: pytest.MonkeyPatch) -> None:
6668

6769
def test_disconnect_timeout(monkeypatch: pytest.MonkeyPatch) -> None:
6870
try:
71+
monkeypatch.delenv(name=Options.ENV_SESSION_DISCONNECT_TIMEOUT, raising=False)
6972
options: Options = Options()
7073
assert options.session_disconnect_timeout_seconds == 30
7174

0 commit comments

Comments
 (0)