Skip to content

Commit 1f8014c

Browse files
authored
bpo-46425: fix direct invocation of test_fileutils and test_zoneinfo (GH-30792)
1 parent 57316c5 commit 1f8014c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Lib/test/test_fileutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_capi_normalize_path(self):
1515
if os.name == 'nt':
1616
raise unittest.SkipTest('Windows has its own helper for this')
1717
else:
18-
from .test_posixpath import PosixPathTest as posixdata
18+
from test.test_posixpath import PosixPathTest as posixdata
1919
tests = posixdata.NORMPATH_CASES
2020
for filename, expected in tests:
2121
if not os.path.isabs(filename):

Lib/test/test_zoneinfo/test_zoneinfo.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from datetime import date, datetime, time, timedelta, timezone
1818
from functools import cached_property
1919

20-
from . import _support as test_support
21-
from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
20+
from test.test_zoneinfo import _support as test_support
21+
from test.test_zoneinfo._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
2222
from test.support.import_helper import import_module
2323

2424
lzma = import_module('lzma')
@@ -2107,3 +2107,7 @@ def _Pacific_Kiritimati():
21072107

21082108
_ZONEDUMP_DATA = None
21092109
_FIXED_OFFSET_ZONES = None
2110+
2111+
2112+
if __name__ == '__main__':
2113+
unittest.main()

0 commit comments

Comments
 (0)