[Zodb-checkins] CVS: StandaloneZODB/ZODB/tests - testTimeStamp.py:1.1.4.2

Guido van Rossum guido@python.org
Sat, 26 Jan 2002 22:40:22 -0500


Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv32534

Modified Files:
      Tag: StandaloneZODB-1_0-branch
	testTimeStamp.py 
Log Message:
Fix 2.0 compatibility: always call gmtime() with an argument.


=== StandaloneZODB/ZODB/tests/testTimeStamp.py 1.1.4.1 => 1.1.4.2 ===
 
     def checkFullTimeStamp(self):
-        t = time.gmtime()
+        t = time.gmtime(time.time())
         ts = TimeStamp(*t[:6])
 
         # XXX floating point comparison
@@ -43,7 +43,7 @@
         self.assert_(abs(ts.second() - t[5]) < EPSILON)
 
     def checkRawTimestamp(self):
-        t = time.gmtime()
+        t = time.gmtime(time.time())
         ts1 = TimeStamp(*t[:6])
         ts2 = TimeStamp(`ts1`)
 
@@ -57,7 +57,7 @@
         self.assert_(abs(ts1.second() - ts2.second()) < EPSILON)
 
     def checkDictKey(self):
-        t = time.gmtime()
+        t = time.gmtime(time.time())
         ts1 = TimeStamp(*t[:6])
         ts2 = TimeStamp(2000, *t[1:6])
 
@@ -75,7 +75,7 @@
 
     def checkLaterThan(self):
         # XXX what does laterThan() do?
-        t = time.gmtime()
+        t = time.gmtime(time.time())
         ts = TimeStamp(*t[:6])
         ts2 = ts.laterThan(ts)
         self.assert_(ts2 > ts)