https://github.com/python/cpython/commit/897671bfd52767e9941640ec01f6cb68c6342d9b
commit: 897671bfd52767e9941640ec01f6cb68c6342d9b
branch: main
author: Stan Ulbrych <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-10-23T20:11:27+01:00
summary:

gh-120965: Skip `test_zoneinfo.ExtensionBuiltTest` if C extension is not 
available (#131104)

Co-authored-by: Paul Ganssle <[email protected]>

files:
M Lib/test/test_zoneinfo/test_zoneinfo.py

diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py 
b/Lib/test/test_zoneinfo/test_zoneinfo.py
index 6d00040babbd72..05ceb865cffc3f 100644
--- a/Lib/test/test_zoneinfo/test_zoneinfo.py
+++ b/Lib/test/test_zoneinfo/test_zoneinfo.py
@@ -13,6 +13,7 @@
 import re
 import shutil
 import struct
+import sys
 import tempfile
 import types
 import unittest
@@ -2236,6 +2237,8 @@ def test_pydatetime(self):
             PYTHONTZPATH=str(ZONEINFO_DATA.tzpath))
 
 
[email protected](sys.modules.get("_zoneinfo") is None,
+                 "_zoneinfo C module not available")
 class ExtensionBuiltTest(unittest.TestCase):
     """Smoke test to ensure that the C and Python extensions are both tested.
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to