From 71eea30639ec0c36b61816103baa6cf7ce835ca0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Sep 2024 21:02:08 -0500 Subject: [PATCH] keep PYTHONPATH when requested This turns out to be needed by the testsuite of jepler_udecimal, which needs to add the `jepler_udecimal` directory both to PYTHONPATH and MICROPYPATH. --- tests/run-tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/run-tests.py b/tests/run-tests.py index 9f1c4564a6cf..3b7bca64cce9 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -829,6 +829,10 @@ def run_one_test(test_file): "PATH": os.environ["PATH"], "LANG": "en_US.UTF-8", } + # CIRCUITPY-CHANGE: --keep-path applies to PYTHONPATH as well + if args.keep_path and os.getenv("PYTHONPATH"): + e["PYTHONPATH"] += ":" + os.getenv("PYTHONPATH") + # run CPython to work out expected output try: output_expected = subprocess.check_output(