From: CF Bolz-Tereick Date: Sat, 31 May 2025 11:46:22 +0000 (+0200) Subject: skip test for sys._stdlib_dir if that is not present (#134973) X-Git-Tag: v3.15.0a1~1431 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=895119ec24589cbf522e375aa71f27b9b7383a8b;p=thirdparty%2FPython%2Fcpython.git skip test for sys._stdlib_dir if that is not present (#134973) --- diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 65d15610ed15..83745f3d0ba4 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1299,6 +1299,7 @@ class SysModuleTest(unittest.TestCase): 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)