Skip to content

Commit 05a40ea

Browse files
committed
Remove some remaining invocations of test.test_support (issue #109)
1 parent 02bee8d commit 05a40ea

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

src/future/backports/test/support.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
from future import utils
1010
from future.builtins import str, range, open, int, map, list
1111

12-
# if __name__ != 'test.support':
13-
# raise ImportError('support must be imported from the test package')
14-
1512
import contextlib
1613
import errno
1714
import functools

tests/test_future/test_urllib_response.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def readline(self):
2222
def close(self):
2323
self.closed = True
2424

25+
2526
class Testaddbase(unittest.TestCase):
2627

2728
# TODO(jhylton): Write tests for other functionality of addbase()
@@ -39,8 +40,6 @@ def f():
3940
self.assertTrue(self.fp.closed)
4041
self.assertRaises(ValueError, f)
4142

42-
def test_main():
43-
test_support.run_unittest(Testaddbase)
4443

4544
if __name__ == '__main__':
46-
test_main()
45+
unittest.main()

tests/test_past/test_olddict.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88
import sys
99

10-
from future.utils import implements_iterator, PY26, PY3
10+
from future.utils import implements_iterator, PY3
1111
from future.tests.base import unittest, skip26
1212
from past.builtins import dict
1313

@@ -785,19 +785,7 @@ def test_tuple_keyerror(self):
785785
# self._tracked(MyDict())
786786

787787

788-
def test_main():
789-
if PY3:
790-
from test import support as test_support
791-
else:
792-
from test import test_support
793-
788+
if __name__ == '__main__':
794789
# Only run these tests on Python 3 ...
795790
if PY3:
796-
test_support.run_unittest(
797-
TestOldDict,
798-
Py2DictTest,
799-
)
800-
801-
802-
if __name__ == '__main__':
803-
test_main()
791+
unittest.main()

0 commit comments

Comments
 (0)