[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 86ee49f469)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
Miss Islington (bot) 2023-05-18 16:20:35 -07:00 committed by GitHub
parent 99a162a9a9
commit 3d52f7e60c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -829,9 +829,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_'))