From 11cfb573d27661962d90c69ddda4e620255eecb6 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 30 Oct 2025 12:38:17 +0100 Subject: [6.0.x] Refs #36680 -- Fixed admin_scripts tests crash when black is not installed. Regression in 6436ec321073bf0622af815e0af08f54c97f9b30. Backport of 3939cd279569fde44f557d79f20bb5b1a02440af from main. --- tests/admin_scripts/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/admin_scripts/tests.py') diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index 9442822bd6..c01a5571dc 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -119,7 +119,8 @@ class AdminScriptTestCase(SimpleTestCase): path_component for path_component in os.environ.get("PATH", "").split(os.pathsep) for formatter_path in find_formatters().values() - if os.path.commonpath([path_component, formatter_path]) == os.sep + if formatter_path + and os.path.commonpath([path_component, formatter_path]) == os.sep ] ) -- cgit v1.3