From 51e3ee90d3700e3528da2ae0ae4e361c4aa451f0 Mon Sep 17 00:00:00 2001 From: Sebastian Grabowski Date: Fri, 1 Mar 2024 03:54:19 +0100 Subject: [PATCH] Change the directory instead of setting PYTHONSAFEPATH PYTHONSAFEPATH is a feature from Python 3.11 --- .github/workflows/unit_tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index bd0a8ecf9..bb6b1f52b 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -31,4 +31,7 @@ jobs: sudo meson install - name: Run unit tests with Pytest run: | - PYTHONSAFEPATH=1 PYTHONPATH=/usr/local/lib/python3.8/site-packages ./run-tests + mkdir dummydir + # Change to dummy directory to prevent adding the source root to sys.path + cd dummydir + PYTHONPATH=/usr/local/lib/python3.8/site-packages ../run-tests