Skip to content

Commit 2b37f9b

Browse files
committed
fix env vars
1 parent 926ce43 commit 2b37f9b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pythonFiles/tests/pytestadapter/helpers.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,14 @@ def runner(args: List[str]) -> Optional[Dict[str, Any]]:
107107
_, port = listener.getsockname()
108108
listener.listen()
109109

110-
env = {
111-
"TEST_UUID": str(uuid.uuid4()),
112-
"TEST_PORT": str(port),
113-
"PYTHONPATH": os.fspath(pathlib.Path(__file__).parent.parent.parent),
114-
}
110+
env = os.environ.copy()
111+
env.update(
112+
{
113+
"TEST_UUID": str(uuid.uuid4()),
114+
"TEST_PORT": str(port),
115+
"PYTHONPATH": os.fspath(pathlib.Path(__file__).parent.parent.parent),
116+
}
117+
)
115118

116119
result: list = []
117120
t1: threading.Thread = threading.Thread(

0 commit comments

Comments
 (0)