diff options
| author | Zachary Ware <zachary.ware@gmail.com> | 2013-11-24 07:20:14 (GMT) |
|---|---|---|
| committer | Zachary Ware <zachary.ware@gmail.com> | 2013-11-24 07:20:14 (GMT) |
| commit | fe94d8adfcf146af7531a315092e3ae954b68968 (patch) | |
| tree | 0aacdd5e9ca70ddafb0019d93304aa2130968816 /Lib/test/test_builtin.py | |
| parent | 1d1d8343286cb09b43e333cd96b4061ef18a1b3d (diff) | |
| parent | a4b7a7548c43d1d7f4fd52129aa32340ca15af6a (diff) | |
| download | cpython-fe94d8adfcf146af7531a315092e3ae954b68968.zip cpython-fe94d8adfcf146af7531a315092e3ae954b68968.tar.gz cpython-fe94d8adfcf146af7531a315092e3ae954b68968.tar.bz2 | |
Merge heads
Diffstat (limited to 'Lib/test/test_builtin.py')
| -rw-r--r-- | Lib/test/test_builtin.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 2411c9b..6843066 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1592,21 +1592,10 @@ class TestSorted(unittest.TestCase): data = 'The quick Brown fox Jumped over The lazy Dog'.split() self.assertRaises(TypeError, sorted, data, None, lambda x,y: 0) -def test_main(verbose=None): - test_classes = (BuiltinTest, TestSorted) - - run_unittest(*test_classes) - - # verify reference counting - if verbose and hasattr(sys, "gettotalrefcount"): - import gc - counts = [None] * 5 - for i in range(len(counts)): - run_unittest(*test_classes) - gc.collect() - counts[i] = sys.gettotalrefcount() - print(counts) - +def load_tests(loader, tests, pattern): + from doctest import DocTestSuite + tests.addTest(DocTestSuite(builtins)) + return tests if __name__ == "__main__": - test_main(verbose=True) + unittest.main() |
