From 3939cd279569fde44f557d79f20bb5b1a02440af Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 30 Oct 2025 12:38:17 +0100 Subject: [PATCH] Refs #36680 -- Fixed admin_scripts tests crash when black is not installed. Regression in 6436ec321073bf0622af815e0af08f54c97f9b30. --- tests/admin_scripts/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ] )