Skip to content

Commit a6a0885

Browse files
authored
[3.10] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30699)
1 parent 07b12fd commit a6a0885

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

Lib/test/test_compileall.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import filecmp
44
import importlib.util
55
import io
6-
import itertools
76
import os
87
import pathlib
98
import py_compile
@@ -29,9 +28,8 @@
2928
from test import support
3029
from test.support import os_helper
3130
from test.support import script_helper
32-
33-
from .test_py_compile import without_source_date_epoch
34-
from .test_py_compile import SourceDateEpochTestMeta
31+
from test.test_py_compile import without_source_date_epoch
32+
from test.test_py_compile import SourceDateEpochTestMeta
3533

3634

3735
def get_pyc(script, opt):

Lib/test/test_distutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
be run.
66
"""
77

8-
import warnings
8+
import unittest
99
from test import support
1010
from test.support import warnings_helper
1111

Lib/test/test_dtrace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ class SystemTapOptimizedTests(TraceTests, unittest.TestCase):
170170

171171

172172
if __name__ == '__main__':
173-
test_main()
173+
unittest.main()

Lib/test/test_zipfile64.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
from tempfile import TemporaryFile
1919

2020
from test.support import os_helper
21-
from test.support import TESTFN, requires_zlib
21+
from test.support import requires_zlib
2222

23+
TESTFN = os_helper.TESTFN
2324
TESTFN2 = TESTFN + "2"
2425

2526
# How much time in seconds can pass before we print a 'Still working' message.

Lib/unittest/test/test_program.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from test import support
77
import unittest
88
import unittest.test
9-
from .test_result import BufferedWriter
9+
from unittest.test.test_result import BufferedWriter
1010

1111

1212
class Test_TestProgram(unittest.TestCase):

0 commit comments

Comments
 (0)