Skip to content

Commit

Permalink
pythongh-104629: Don't skip test_clinic if _testclinic is missing (py…
Browse files Browse the repository at this point in the history
…thon#104630)

Just skip the tests that depend on the _testclinic extension module;
we can still run the Python tests.
  • Loading branch information
erlend-aasland authored May 18, 2023
1 parent b9dce3a commit 86ee49f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,9 +868,12 @@ def test_external(self):
self.assertEqual(new_mtime_ns, old_mtime_ns)


ac_tester = import_helper.import_module('_testclinic')

try:
import _testclinic as ac_tester
except ImportError:
ac_tester = None

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

0 comments on commit 86ee49f

Please sign in to comment.