Skip to content

Commit

Permalink
bpo-46425: Fix direct invocation of multiple test modules (GH-30666)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jan 18, 2022
1 parent ff7703c commit 1292aa6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
6 changes: 2 additions & 4 deletions Lib/test/test_compileall.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import filecmp
import importlib.util
import io
import itertools
import os
import pathlib
import py_compile
Expand All @@ -29,9 +28,8 @@
from test import support
from test.support import os_helper
from test.support import script_helper

from .test_py_compile import without_source_date_epoch
from .test_py_compile import SourceDateEpochTestMeta
from test.test_py_compile import without_source_date_epoch
from test.test_py_compile import SourceDateEpochTestMeta


def get_pyc(script, opt):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_distutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
be run.
"""

import warnings
import unittest
from test import support
from test.support import warnings_helper

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_dtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ class SystemTapOptimizedTests(TraceTests, unittest.TestCase):


if __name__ == '__main__':
test_main()
unittest.main()
2 changes: 1 addition & 1 deletion Lib/test/test_tools/test_freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from test import support
from test.support import os_helper
from test.test_tools import imports_under_tool, skip_if_missing

from . import imports_under_tool, skip_if_missing
skip_if_missing('freeze')
with imports_under_tool('freeze', 'test'):
import freeze as helper
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_zipfile64.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
from tempfile import TemporaryFile

from test.support import os_helper
from test.support import TESTFN, requires_zlib
from test.support import requires_zlib

TESTFN = os_helper.TESTFN
TESTFN2 = TESTFN + "2"

# How much time in seconds can pass before we print a 'Still working' message.
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/test/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from test import support
import unittest
import unittest.test
from .test_result import BufferedWriter
from unittest.test.test_result import BufferedWriter


class Test_TestProgram(unittest.TestCase):
Expand Down

0 comments on commit 1292aa6

Please sign in to comment.