diff options
Diffstat (limited to 'Lib/test/test_unittest.py')
-rw-r--r-- | Lib/test/test_unittest.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py index 8314262cd9..ab043822da 100644 --- a/Lib/test/test_unittest.py +++ b/Lib/test/test_unittest.py @@ -6,8 +6,6 @@ Still need testing: TestCase.{assert,fail}* methods (some are tested implicitly) """ -from StringIO import StringIO -import __builtin__ import os import re import sys @@ -626,7 +624,6 @@ class Test_TestLoader(TestCase): # a good chance that it won't be imported when this test is run module_name = 'audioop' - import sys if module_name in sys.modules: del sys.modules[module_name] @@ -1014,7 +1011,6 @@ class Test_TestLoader(TestCase): # a good chance that it won't be imported when this test is run module_name = 'audioop' - import sys if module_name in sys.modules: del sys.modules[module_name] @@ -1962,8 +1958,6 @@ class Test_TestResult(TestCase): # methods. Contains formatted tracebacks instead # of sys.exc_info() results." def test_addFailure(self): - import sys - class Foo(unittest.TestCase): def test_1(self): pass @@ -2012,8 +2006,6 @@ class Test_TestResult(TestCase): # methods. Contains formatted tracebacks instead # of sys.exc_info() results." def test_addError(self): - import sys - class Foo(unittest.TestCase): def test_1(self): pass @@ -2888,7 +2880,7 @@ test case ctx = self.assertRaises(ExceptionMock) with ctx: Stub(v) - e = ctx.exc_value + e = ctx.exception self.assertIsInstance(e, ExceptionMock) self.assertEqual(e.args[0], v) |