File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ def get_modules():
3333 one time — in other words, when using this function you will only ever
3434 get one copy of each module rather than a fresh import each time.
3535 """
36+ import zoneinfo as c_module
3637
3738 py_module = import_fresh_module ("zoneinfo" , blocked = ["_zoneinfo" ])
3839
Original file line number Diff line number Diff line change @@ -1915,8 +1915,8 @@ def test_exclude_posixrules(self):
19151915class CTestModule (TestModule ):
19161916 module = c_zoneinfo
19171917
1918-
1919- @ unittest . skipIf ( c_zoneinfo == py_zoneinfo , "zoneinfo C extension not available" )
1918+ @ unittest . skipIf ( __import__ ( "sys" ). modules . get ( "_zoneinfo" ) is None ,
1919+ "_zoneinfo C module not available" )
19201920class ExtensionBuiltTest (unittest .TestCase ):
19211921 """Smoke test to ensure that the C and Python extensions are both tested.
19221922
You can’t perform that action at this time.
0 commit comments