Skip to content

Commit 8105dd2

Browse files
authored
[3.9] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30700)
1 parent 3b51926 commit 8105dd2

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
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
@@ -24,9 +23,8 @@
2423

2524
from test import support
2625
from test.support import script_helper
27-
28-
from .test_py_compile import without_source_date_epoch
29-
from .test_py_compile import SourceDateEpochTestMeta
26+
from test.test_py_compile import without_source_date_epoch
27+
from test.test_py_compile import SourceDateEpochTestMeta
3028

3129

3230
def get_pyc(script, opt):

Lib/test/test_distutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import distutils.tests
99
import test.support
10-
10+
import unittest
1111

1212
def load_tests(*_):
1313
# used by unittest

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/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)