Skip to content

Commit c12439b

Browse files
committed
fixup! Add tests and implementation for ZoneInfo
1 parent 0cad151 commit c12439b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_zoneinfo/_support.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ def inner():
2525

2626
@call_once
2727
def get_modules():
28+
"""Retrieve two copies of zoneinfo: pure Python and C accelerated.
29+
30+
Because this function manipulates the import system in a way that might
31+
be fragile or do unexpected things if it is run many times, it uses a
32+
`call_once` decorator to ensure that this is only ever called exactly
33+
one time — in other words, when using this function you will only ever
34+
get one copy of each module rather than a fresh import each time.
35+
"""
2836
import zoneinfo as c_module
2937
py_module = import_fresh_module("zoneinfo", blocked=["_czoneinfo"])
3038

0 commit comments

Comments
 (0)