From: Ralf S. <sch...@us...> - 2007-03-12 17:53:45
|
Update of /cvsroot/roundup/roundup/test In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23097/test Modified Files: test_dates.py Log Message: - remove some try:/import statements caught by alexander smishlajev Index: test_dates.py =================================================================== RCS file: /cvsroot/roundup/roundup/test/test_dates.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** test_dates.py 9 Mar 2007 10:25:10 -0000 1.40 --- test_dates.py 12 Mar 2007 17:53:38 -0000 1.41 *************** *** 19,23 **** from __future__ import nested_scopes ! import unittest, time from roundup.date import Date, Interval, Range, fixTimeOverflow, get_timezone --- 19,25 ---- from __future__ import nested_scopes ! import unittest ! import time ! import datetime from roundup.date import Date, Interval, Range, fixTimeOverflow, get_timezone *************** *** 394,401 **** def testPyDatetime(self): - try: - import datetime - except: - return d = datetime.datetime.now() Date(d) --- 396,399 ---- *************** *** 423,434 **** date = Date('1902') ae(date.timestamp(), -2145916800) ! try: ! from time import gmtime ! except: ! return ! date = Date(gmtime(0)) ae(date.timestamp(), 0) ae(str(date), '1970-01-01.00:00:00') ! date = Date(gmtime(0x7FFFFFFF)) ae(date.timestamp(), 2147483647) ae(str(date), '2038-01-19.03:14:07') --- 421,428 ---- date = Date('1902') ae(date.timestamp(), -2145916800) ! date = Date(time.gmtime(0)) ae(date.timestamp(), 0) ae(str(date), '1970-01-01.00:00:00') ! date = Date(time.gmtime(0x7FFFFFFF)) ae(date.timestamp(), 2147483647) ae(str(date), '2038-01-19.03:14:07') |