From 1241c47aa2af26d90be1fdb6b0990a08bf9beafd Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 7 Aug 2014 03:20:22 +0300 Subject: [PATCH] #22092: use absolute imports in unittest tests. Patch by Vajrasky Kok. --- Lib/unittest/test/test_case.py | 2 +- Lib/unittest/test/test_discovery.py | 1 + Lib/unittest/test/test_functiontestcase.py | 2 +- Lib/unittest/test/test_program.py | 1 + Lib/unittest/test/test_runner.py | 3 ++- Lib/unittest/test/test_skipping.py | 2 +- Lib/unittest/test/test_suite.py | 2 +- 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Lib/unittest/test/test_case.py b/Lib/unittest/test/test_case.py index 49325784d2d..e70dd5bd03b 100644 --- a/Lib/unittest/test/test_case.py +++ b/Lib/unittest/test/test_case.py @@ -14,7 +14,7 @@ from test import support import unittest -from .support import ( +from unittest.test.support import ( TestEquality, TestHashing, LoggingResult, LegacyLoggingResult, ResultWithNoStartTestRunStopTestRun ) diff --git a/Lib/unittest/test/test_discovery.py b/Lib/unittest/test/test_discovery.py index 6b7b1280f8b..abb90669b30 100644 --- a/Lib/unittest/test/test_discovery.py +++ b/Lib/unittest/test/test_discovery.py @@ -6,6 +6,7 @@ import builtins from test import support import unittest +import unittest.test class TestableTestProgram(unittest.TestProgram): diff --git a/Lib/unittest/test/test_functiontestcase.py b/Lib/unittest/test/test_functiontestcase.py index d7fe07a53b9..c5f2bcbe741 100644 --- a/Lib/unittest/test/test_functiontestcase.py +++ b/Lib/unittest/test/test_functiontestcase.py @@ -1,6 +1,6 @@ import unittest -from .support import LoggingResult +from unittest.test.support import LoggingResult class Test_FunctionTestCase(unittest.TestCase): diff --git a/Lib/unittest/test/test_program.py b/Lib/unittest/test/test_program.py index 32942980306..725d67fdaf8 100644 --- a/Lib/unittest/test/test_program.py +++ b/Lib/unittest/test/test_program.py @@ -4,6 +4,7 @@ import os import sys from test import support import unittest +import unittest.test class Test_TestProgram(unittest.TestCase): diff --git a/Lib/unittest/test/test_runner.py b/Lib/unittest/test/test_runner.py index ef1c1af9f10..7c0bd51d798 100644 --- a/Lib/unittest/test/test_runner.py +++ b/Lib/unittest/test/test_runner.py @@ -7,7 +7,8 @@ import subprocess import unittest from unittest.case import _Outcome -from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun +from unittest.test.support import (LoggingResult, + ResultWithNoStartTestRunStopTestRun) class TestCleanUp(unittest.TestCase): diff --git a/Lib/unittest/test/test_skipping.py b/Lib/unittest/test/test_skipping.py index 314a7a4d0f8..807510f15f3 100644 --- a/Lib/unittest/test/test_skipping.py +++ b/Lib/unittest/test/test_skipping.py @@ -1,6 +1,6 @@ import unittest -from .support import LoggingResult +from unittest.test.support import LoggingResult class Test_TestSkipping(unittest.TestCase): diff --git a/Lib/unittest/test/test_suite.py b/Lib/unittest/test/test_suite.py index 38311ca4880..0551a169967 100644 --- a/Lib/unittest/test/test_suite.py +++ b/Lib/unittest/test/test_suite.py @@ -3,7 +3,7 @@ import unittest import gc import sys import weakref -from .support import LoggingResult, TestEquality +from unittest.test.support import LoggingResult, TestEquality ### Support code for Test_TestSuite