mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
#22092: use absolute imports in unittest tests. Patch by Vajrasky Kok.
This commit is contained in:
parent
3d4b2d4df2
commit
1241c47aa2
7 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
import unittest.test
|
||||||
|
|
||||||
|
|
||||||
class TestableTestProgram(unittest.TestProgram):
|
class TestableTestProgram(unittest.TestProgram):
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
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
|
||||||
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
|
||||||
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):
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
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
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue