From f3fb62b71f2759937b2c3674a590e38de7e0d761 Mon Sep 17 00:00:00 2001 From: CF Bolz-Tereick Date: Sat, 31 May 2025 13:14:00 +0200 Subject: [PATCH] skip test for sys._stdlib_dir if that is not present --- Lib/test/test_sys.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 65d15610ed1505..83745f3d0ba46e 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1299,6 +1299,7 @@ def test_module_names(self): for name in sys.stdlib_module_names: self.assertIsInstance(name, str) + @unittest.skipUnless(hasattr(sys, '_stdlib_dir'), 'need sys._stdlib_dir') def test_stdlib_dir(self): os = import_helper.import_fresh_module('os') marker = getattr(os, '__file__', None)