@@ -16,11 +16,11 @@ def test(self):
16
16
["python" , test_file ],
17
17
env = env ,
18
18
stdout = subprocess .PIPE ,
19
- stderr = subprocess .PIPE ,
19
+ stderr = subprocess .STDOUT ,
20
20
)
21
21
with open (expected_file , "r" , encoding = "utf-8" ) as r :
22
22
# Allow duration to change
23
- expected = re .sub (r"([()])" , r"\\\1" , r .read ())
23
+ expected = re .sub ( r"([()])" , r"\\\1" , r .read () )
24
24
expected = re .sub (
25
25
r"(?<=<COMPLETEDIN::>)\d+(?:\.\d+)?" , r"\\d+(?:\\.\\d+)?" , expected
26
26
)
@@ -41,7 +41,7 @@ def test(self):
41
41
["python" , test_file ],
42
42
env = env ,
43
43
stdout = subprocess .PIPE ,
44
- stderr = subprocess .PIPE ,
44
+ stderr = subprocess .STDOUT ,
45
45
)
46
46
with open (sample_file , "r" , encoding = "utf-8" ) as r :
47
47
# Ensure that it contains the same output structure
@@ -62,15 +62,15 @@ def define_tests():
62
62
test_func = test_against_expected (
63
63
os .path .join (fixtures_dir , f ),
64
64
expected_file ,
65
- {"PYTHONPATH" : package_dir },
65
+ {"PYTHONPATH" : str ( package_dir ) },
66
66
)
67
67
else :
68
68
# Use `.sample.txt` when testing against outputs with more variables.
69
69
# This version only checks for the basic structure.
70
70
test_func = test_against_sample (
71
71
os .path .join (fixtures_dir , f ),
72
72
os .path .join (fixtures_dir , f .replace (".py" , ".sample.txt" )),
73
- {"PYTHONPATH" : package_dir },
73
+ {"PYTHONPATH" : str ( package_dir ) },
74
74
)
75
75
setattr (TestOutputs , "test_{0}" .format (f .replace (".py" , "" )), test_func )
76
76
0 commit comments