]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46425: fix direct invocation of `test_fileutils` and `test_zoneinfo` (GH-30792)
authorNikita Sobolev <mail@sobolevn.me>
Sat, 22 Jan 2022 16:05:43 +0000 (19:05 +0300)
committerGitHub <noreply@github.com>
Sat, 22 Jan 2022 16:05:43 +0000 (18:05 +0200)
Lib/test/test_fileutils.py
Lib/test/test_zoneinfo/test_zoneinfo.py

index 45b3f3233c6171b671d3998cb0128244cfac5b74..ff13498fbfeb5c2d03708c3880fc800cc8494a5c 100644 (file)
@@ -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):
index 59b35ef63f9871beee3d94301bbce15b2130f90c..a2172f3ac21d08019b03fd0cad8dde9ddca4976d 100644 (file)
@@ -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()