summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-01-22 16:05:43 (GMT)
committerGitHub <noreply@github.com>2022-01-22 16:05:43 (GMT)
commit1f8014c5b4ea7acee069ca453f6fbcad5990ebf0 (patch)
tree28ae55dc975c45c9b5b3a1bf868a06c1feb015ab /Lib
parent57316c52bae5d6420f5067f3891ec328deb97305 (diff)
downloadcpython-1f8014c5b4ea7acee069ca453f6fbcad5990ebf0.zip
cpython-1f8014c5b4ea7acee069ca453f6fbcad5990ebf0.tar.gz
cpython-1f8014c5b4ea7acee069ca453f6fbcad5990ebf0.tar.bz2
bpo-46425: fix direct invocation of `test_fileutils` and `test_zoneinfo` (GH-30792)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_fileutils.py2
-rw-r--r--Lib/test/test_zoneinfo/test_zoneinfo.py8
2 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_fileutils.py b/Lib/test/test_fileutils.py
index 45b3f32..ff13498 100644
--- a/Lib/test/test_fileutils.py
+++ b/Lib/test/test_fileutils.py
@@ -15,7 +15,7 @@ class PathTests(unittest.TestCase):
if os.name == 'nt':
raise unittest.SkipTest('Windows has its own helper for this')
else:
- from .test_posixpath import PosixPathTest as posixdata
+ from test.test_posixpath import PosixPathTest as posixdata
tests = posixdata.NORMPATH_CASES
for filename, expected in tests:
if not os.path.isabs(filename):
diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py
index 59b35ef..a2172f3 100644
--- a/Lib/test/test_zoneinfo/test_zoneinfo.py
+++ b/Lib/test/test_zoneinfo/test_zoneinfo.py
@@ -17,8 +17,8 @@ import unittest
from datetime import date, datetime, time, timedelta, timezone
from functools import cached_property
-from . import _support as test_support
-from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
+from test.test_zoneinfo import _support as test_support
+from test.test_zoneinfo._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
from test.support.import_helper import import_module
lzma = import_module('lzma')
@@ -2107,3 +2107,7 @@ class ZoneDumpData:
_ZONEDUMP_DATA = None
_FIXED_OFFSET_ZONES = None
+
+
+if __name__ == '__main__':
+ unittest.main()