Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_datetime.py @ 41535:1002f42e10cd legacy-trunk
Remove functionality from test_datetime.test_main() that does reference count checking; 'regrtest.py -R' is the way to do this kind of testing.
| author | Collin Winter <collinw@gmail.com> |
|---|---|
| date | Wed, 25 Apr 2007 17:37:35 +0000 |
| parents | 6c4d7678af5e |
| children | 2c422a4972f1 |
line wrap: on
line diff
--- a/Lib/test/test_datetime.py Wed Apr 25 17:29:52 2007 +0000 +++ b/Lib/test/test_datetime.py Wed Apr 25 17:37:35 2007 +0000 @@ -3249,26 +3249,7 @@ self.assertEqual(datetime_sc, as_datetime) def test_main(): - import gc - import sys - - lastrc = None - while True: - test_support.run_unittest(__name__) - if 1: # change to 0, under a debug build, for some leak detection - break - gc.collect() - if gc.garbage: - raise SystemError("gc.garbage not empty after test run: %r" % - gc.garbage) - if hasattr(sys, 'gettotalrefcount'): - thisrc = sys.gettotalrefcount() - print >> sys.stderr, '*' * 10, 'total refs:', thisrc, - if lastrc: - print >> sys.stderr, 'delta:', thisrc - lastrc - else: - print >> sys.stderr - lastrc = thisrc + test_support.run_unittest(__name__) if __name__ == "__main__": test_main()
