Pytest: fix local params overriden (#30312)

* fix local params being overriden

* just reset prefix after completion
old-commit-hash: 412f4cbc1a82fe585d2beb5c84032c685f22e5ec
This commit is contained in:
Justin Newberry
2023-10-23 20:41:19 -04:00
committed by GitHub
parent 105a379a0c
commit fe14ca751f
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -10,8 +10,13 @@ def openpilot_function_fixture():
# setup a clean environment for each test
with OpenpilotPrefix():
prefix = os.environ["OPENPILOT_PREFIX"]
yield
# ensure the test doesn't change the prefix
assert "OPENPILOT_PREFIX" in os.environ and prefix == os.environ["OPENPILOT_PREFIX"]
os.environ.clear()
os.environ.update(starting_env)