mirror of https://github.com/python/cpython
bpo-46425: Fix direct invocation of multiple test modules (GH-30666)
This commit is contained in:
parent
ff7703c4b6
commit
1292aa6db5
|
@ -3,7 +3,6 @@ import contextlib
|
||||||
import filecmp
|
import filecmp
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import io
|
import io
|
||||||
import itertools
|
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import py_compile
|
import py_compile
|
||||||
|
@ -29,9 +28,8 @@ except NotImplementedError:
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import os_helper
|
from test.support import os_helper
|
||||||
from test.support import script_helper
|
from test.support import script_helper
|
||||||
|
from test.test_py_compile import without_source_date_epoch
|
||||||
from .test_py_compile import without_source_date_epoch
|
from test.test_py_compile import SourceDateEpochTestMeta
|
||||||
from .test_py_compile import SourceDateEpochTestMeta
|
|
||||||
|
|
||||||
|
|
||||||
def get_pyc(script, opt):
|
def get_pyc(script, opt):
|
||||||
|
|
|
@ -5,7 +5,7 @@ the test_suite() function there returns a test suite that's ready to
|
||||||
be run.
|
be run.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import warnings
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import warnings_helper
|
from test.support import warnings_helper
|
||||||
|
|
||||||
|
|
|
@ -170,4 +170,4 @@ class SystemTapOptimizedTests(TraceTests, unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test_main()
|
unittest.main()
|
||||||
|
|
|
@ -6,8 +6,8 @@ import unittest
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import os_helper
|
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')
|
skip_if_missing('freeze')
|
||||||
with imports_under_tool('freeze', 'test'):
|
with imports_under_tool('freeze', 'test'):
|
||||||
import freeze as helper
|
import freeze as helper
|
||||||
|
|
|
@ -18,8 +18,9 @@ import sys
|
||||||
from tempfile import TemporaryFile
|
from tempfile import TemporaryFile
|
||||||
|
|
||||||
from test.support import os_helper
|
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"
|
TESTFN2 = TESTFN + "2"
|
||||||
|
|
||||||
# How much time in seconds can pass before we print a 'Still working' message.
|
# How much time in seconds can pass before we print a 'Still working' message.
|
||||||
|
|
|
@ -6,7 +6,7 @@ import subprocess
|
||||||
from test import support
|
from test import support
|
||||||
import unittest
|
import unittest
|
||||||
import unittest.test
|
import unittest.test
|
||||||
from .test_result import BufferedWriter
|
from unittest.test.test_result import BufferedWriter
|
||||||
|
|
||||||
|
|
||||||
class Test_TestProgram(unittest.TestCase):
|
class Test_TestProgram(unittest.TestCase):
|
||||||
|
|
Loading…
Reference in New Issue