From eabdf6e0a1c2ec4b65d3b1f50c7f0b729b0d2e1f Mon Sep 17 00:00:00 2001 From: Quentin Santos Date: Mon, 13 May 2024 21:43:17 +0200 Subject: [PATCH] Don't clear other environment variables --- tester.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tester.py b/tester.py index e665796..da6720f 100644 --- a/tester.py +++ b/tester.py @@ -1,4 +1,5 @@ from math import isclose +from os import environ from subprocess import Popen, PIPE from sys import executable from time import time @@ -23,7 +24,7 @@ assert overhead >= 0.010 # Test time acceleration with environment-variables -p = Popen(COMMAND, stdout=PIPE, env={"TIMESKEW": "10 1"}) +p = Popen(COMMAND, stdout=PIPE, env={"TIMESKEW": "10 1", **environ}) start = time() p.wait() real_elapsed = time() - start @@ -32,7 +33,7 @@ assert isclose(fake_elapsed, SLEEP_DURATION, rel_tol=TOLERANCE) # Test time slow-down with environment-variables -p = Popen(COMMAND, stdout=PIPE, env={"TIMESKEW": "1 10"}) +p = Popen(COMMAND, stdout=PIPE, env={"TIMESKEW": "1 10", **environ}) start = time() p.wait() real_elapsed = time() - start