Skip to content

Commit 3d52f7e

Browse files
[3.11] gh-104629: Don't skip test_clinic if _testclinic is missing (GH-104630) (#104632)
gh-104629: Don't skip test_clinic if _testclinic is missing (GH-104630) Just skip the tests that depend on the _testclinic extension module; we can still run the Python tests. (cherry picked from commit 86ee49f) Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 99a162a commit 3d52f7e

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
@@ -829,9 +829,12 @@ def test_external(self):
829829
self.assertEqual(new_mtime_ns, old_mtime_ns)
830830

831831

832-
ac_tester = import_helper.import_module('_testclinic')
833-
832+
try:
833+
import _testclinic as ac_tester
834+
except ImportError:
835+
ac_tester = None
834836

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

0 commit comments

Comments
 (0)