Skip to content

Commit

Permalink
reset env after no_env_var, important if wrapped block sets var
Browse files Browse the repository at this point in the history
  • Loading branch information
mattf committed Jul 30, 2024
1 parent 571570f commit 454f8ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/ai-endpoints/tests/unit_tests/test_api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def no_env_var(var: str) -> Generator[None, None, None]:
finally:
if val:
os.environ[var] = val
else:
if var in os.environ:
del os.environ[var]


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit 454f8ac

Please sign in to comment.