[3.10] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30699)

This commit is contained in:
Nikita Sobolev 2022-01-20 04:44:21 +03:00 committed by GitHub
parent 07b12fdf55
commit a6a0885480
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8 deletions

View file

@ -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):

View file

@ -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

View file

@ -170,4 +170,4 @@ class SystemTapOptimizedTests(TraceTests, unittest.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
test_main() unittest.main()

View file

@ -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.

View file

@ -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):