Fix tests that use skip_if
This commit is contained in:
parent
6d59e55599
commit
ac64e6d807
@ -712,9 +712,11 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
|
|||||||
with open(test_file_expected, "rb") as f:
|
with open(test_file_expected, "rb") as f:
|
||||||
output_expected = f.read()
|
output_expected = f.read()
|
||||||
else:
|
else:
|
||||||
|
# CIRCUITPY: set language & make sure testlib is available for `skip_ok`.
|
||||||
|
e = {"PYTHONPATH": "testlib", "PATH": os.environ["PATH"], "LANG": "en_US.UTF-8"}
|
||||||
# run CPython to work out expected output
|
# run CPython to work out expected output
|
||||||
try:
|
try:
|
||||||
output_expected = subprocess.check_output(CPYTHON3_CMD + [test_file])
|
output_expected = subprocess.check_output(CPYTHON3_CMD + [test_file], env=e)
|
||||||
if args.write_exp:
|
if args.write_exp:
|
||||||
with open(test_file_expected, "wb") as f:
|
with open(test_file_expected, "wb") as f:
|
||||||
f.write(output_expected)
|
f.write(output_expected)
|
||||||
|
Loading…
Reference in New Issue
Block a user