Kaydet (Commit) 1241c47a authored tarafından Ezio Melotti's avatar Ezio Melotti

#22092: use absolute imports in unittest tests. Patch by Vajrasky Kok.

üst 3d4b2d4d
...@@ -14,7 +14,7 @@ from test import support ...@@ -14,7 +14,7 @@ from test import support
import unittest import unittest
from .support import ( from unittest.test.support import (
TestEquality, TestHashing, LoggingResult, LegacyLoggingResult, TestEquality, TestHashing, LoggingResult, LegacyLoggingResult,
ResultWithNoStartTestRunStopTestRun ResultWithNoStartTestRunStopTestRun
) )
......
...@@ -6,6 +6,7 @@ import builtins ...@@ -6,6 +6,7 @@ import builtins
from test import support from test import support
import unittest import unittest
import unittest.test
class TestableTestProgram(unittest.TestProgram): class TestableTestProgram(unittest.TestProgram):
......
import unittest import unittest
from .support import LoggingResult from unittest.test.support import LoggingResult
class Test_FunctionTestCase(unittest.TestCase): class Test_FunctionTestCase(unittest.TestCase):
......
...@@ -4,6 +4,7 @@ import os ...@@ -4,6 +4,7 @@ import os
import sys import sys
from test import support from test import support
import unittest import unittest
import unittest.test
class Test_TestProgram(unittest.TestCase): class Test_TestProgram(unittest.TestCase):
......
...@@ -7,7 +7,8 @@ import subprocess ...@@ -7,7 +7,8 @@ import subprocess
import unittest import unittest
from unittest.case import _Outcome from unittest.case import _Outcome
from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun from unittest.test.support import (LoggingResult,
ResultWithNoStartTestRunStopTestRun)
class TestCleanUp(unittest.TestCase): class TestCleanUp(unittest.TestCase):
......
import unittest import unittest
from .support import LoggingResult from unittest.test.support import LoggingResult
class Test_TestSkipping(unittest.TestCase): class Test_TestSkipping(unittest.TestCase):
......
...@@ -3,7 +3,7 @@ import unittest ...@@ -3,7 +3,7 @@ import unittest
import gc import gc
import sys import sys
import weakref import weakref
from .support import LoggingResult, TestEquality from unittest.test.support import LoggingResult, TestEquality
### Support code for Test_TestSuite ### Support code for Test_TestSuite
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment