summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorpmppk <prosenbl@gmail.com>2026-02-25 17:02:00 -0500
committerGitHub <noreply@github.com>2026-02-25 17:02:00 -0500
commitf991a1883889a520679fe41112281435581211e1 (patch)
treeab5af556cde312b5e73533283ce466265c300384 /tests
parenta91e03d7c388ada569a212bafdbdff9c9bff47f2 (diff)
Refs #36652, #36936 -- Improved path manipulation in a migration test launching a subprocess.
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_loader.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/migrations/test_loader.py b/tests/migrations/test_loader.py
index 705d49d069..52aeb8c21b 100644
--- a/tests/migrations/test_loader.py
+++ b/tests/migrations/test_loader.py
@@ -698,7 +698,9 @@ class LoaderTests(TestCase):
test_settings.write(f"INSTALLED_APPS += {INSTALLED_APPS}\n")
test_environ = os.environ.copy()
- test_environ["PYTHONPATH"] = str(tests_dir)
+ test_python_path = sys.path.copy()
+ test_python_path.append(str(tests_dir))
+ test_environ["PYTHONPATH"] = os.pathsep.join(test_python_path)
# Ensure deterministic failures.
test_environ["PYTHONHASHSEED"] = "1"