diff --git a/tests/run-tests.py b/tests/run-tests.py index afab133238..86b2fe5457 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -712,9 +712,11 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): with open(test_file_expected, "rb") as f: output_expected = f.read() 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 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: with open(test_file_expected, "wb") as f: f.write(output_expected) diff --git a/tests/skip_if.py b/tests/testlib/skip_if.py similarity index 100% rename from tests/skip_if.py rename to tests/testlib/skip_if.py