[Python-checkins] python/dist/src/Lib/test test_datetime.py,NONE,1.1

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Mon, 16 Dec 2002 12:18:06 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv26267/python/Lib/test

Added Files:
	test_datetime.py 
Log Message:
datetime escapes the sandbox.  The Windows build is all set.  I leave it
to others to argue about how to build it on other platforms (on Windows
it's in its own DLL).


--- NEW FILE: test_datetime.py ---
"""Test date/time type."""

import sys
import unittest

from test import test_support

from datetime import MINYEAR, MAXYEAR
from datetime import timedelta
from datetime import tzinfo
from datetime import time, timetz
from datetime import date, datetime, datetimetz

#############################################################################
# module tests

class TestModule(unittest.TestCase):

    def test_constants(self):
[...2089 lines suppressed...]
    lastrc = None
    while True:
        test_support.run_suite(thesuite)
        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

if __name__ == "__main__":
    test_main()