Skip to content

Commit e09dbd6

Browse files
committed
Another minor unit test tweak
Use monkeypatch to manipulate system path -- this ensures that the change will also be undone after the test runs.
1 parent 4cef0a4 commit e09dbd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_wrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
@patch("sys.argv", ["wrapper.py", "--verbose"])
77
def test_wrapper(tmp_path, monkeypatch):
88
import xcengine
9-
sys.path += xcengine.__path__
9+
for path in xcengine.__path__:
10+
monkeypatch.syspath_prepend(path)
1011
user_code_path = (tmp_path / "user_code.py")
1112
user_code_path.touch()
1213
os.environ["XC_USER_CODE_PATH"] = str(user_code_path)

0 commit comments

Comments
 (0)