skip test for sys._stdlib_dir if that is not present (#134973)

This commit is contained in:
CF Bolz-Tereick 2025-05-31 13:46:22 +02:00 committed by GitHub
parent af0d3268d9
commit 895119ec24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)