Skip to content

Commit 86ee49f

Browse files
gh-104629: Don't skip test_clinic if _testclinic is missing (#104630)
Just skip the tests that depend on the _testclinic extension module; we can still run the Python tests.
1 parent b9dce3a commit 86ee49f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/test_clinic.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,12 @@ def test_external(self):
868868
self.assertEqual(new_mtime_ns, old_mtime_ns)
869869

870870

871-
ac_tester = import_helper.import_module('_testclinic')
872-
871+
try:
872+
import _testclinic as ac_tester
873+
except ImportError:
874+
ac_tester = None
873875

876+
@unittest.skipIf(ac_tester is None, "_testclinic is missing")
874877
class ClinicFunctionalTest(unittest.TestCase):
875878
locals().update((name, getattr(ac_tester, name))
876879
for name in dir(ac_tester) if name.startswith('test_'))

0 commit comments

Comments
 (0)