Skip to content

Commit e9c16d3

Browse files
Add an explanation comment.
1 parent ee7e8c0 commit e9c16d3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_zoneinfo/test_zoneinfo.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,6 +1949,13 @@ class CTestModule(TestModule):
19491949

19501950
class MiscTests(unittest.TestCase):
19511951
def test_pydatetime(self):
1952+
# Test that zoneinfo works if the C implementation of datetime
1953+
# is not available and the Python implementation of datetime is used.
1954+
# The Python implementation of zoneinfo should be used in thet case.
1955+
#
1956+
# Run the test in a subprocess, as importing _zoneinfo with
1957+
# _datettime disabled causes crash in the previously imported
1958+
# _zoneinfo.
19521959
assert_python_ok('-c', '''if 1:
19531960
import sys
19541961
sys.modules['_datetime'] = None

0 commit comments

Comments
 (0)