Skip to content

Commit

Permalink
Don't clear other environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
qsantos committed May 13, 2024
1 parent ec04b95 commit eabdf6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tester.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eabdf6e

Please sign in to comment.