Skip to content

Commit 9973d1f

Browse files
committed
Update test_outputs.py
1 parent ba881f9 commit 9973d1f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_outputs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ def test(self):
1616
["python", test_file],
1717
env=env,
1818
stdout=subprocess.PIPE,
19-
stderr=subprocess.PIPE,
19+
stderr=subprocess.STDOUT,
2020
)
2121
with open(expected_file, "r", encoding="utf-8") as r:
2222
# Allow duration to change
23-
expected = re.sub(r"([()])", r"\\\1", r.read())
23+
expected = re.sub( r"([()])", r"\\\1", r.read() )
2424
expected = re.sub(
2525
r"(?<=<COMPLETEDIN::>)\d+(?:\.\d+)?", r"\\d+(?:\\.\\d+)?", expected
2626
)
@@ -41,7 +41,7 @@ def test(self):
4141
["python", test_file],
4242
env=env,
4343
stdout=subprocess.PIPE,
44-
stderr=subprocess.PIPE,
44+
stderr=subprocess.STDOUT,
4545
)
4646
with open(sample_file, "r", encoding="utf-8") as r:
4747
# Ensure that it contains the same output structure
@@ -62,15 +62,15 @@ def define_tests():
6262
test_func = test_against_expected(
6363
os.path.join(fixtures_dir, f),
6464
expected_file,
65-
{"PYTHONPATH": package_dir},
65+
{"PYTHONPATH": str(package_dir)},
6666
)
6767
else:
6868
# Use `.sample.txt` when testing against outputs with more variables.
6969
# This version only checks for the basic structure.
7070
test_func = test_against_sample(
7171
os.path.join(fixtures_dir, f),
7272
os.path.join(fixtures_dir, f.replace(".py", ".sample.txt")),
73-
{"PYTHONPATH": package_dir},
73+
{"PYTHONPATH": str(package_dir)},
7474
)
7575
setattr(TestOutputs, "test_{0}".format(f.replace(".py", "")), test_func)
7676

0 commit comments

Comments
 (0)