mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user