[Zope3-checkins] CVS: Zope3/lib/python/datetime - test_datetime.py:1.5

Marius Gedminas mgedmin@codeworks.lt
Thu, 21 Nov 2002 05:26:54 -0500


Update of /cvs-repository/Zope3/lib/python/datetime
In directory cvs.zope.org:/tmp/cvs-serv5248

Modified Files:
	test_datetime.py 
Log Message:
Move test_timetuple to its proper place

=== Zope3/lib/python/datetime/test_datetime.py 1.4 => 1.5 ===
--- Zope3/lib/python/datetime/test_datetime.py:1.4	Tue Nov 19 04:56:21 2002
+++ Zope3/lib/python/datetime/test_datetime.py	Thu Nov 21 05:26:53 2002
@@ -298,6 +298,13 @@
         t = self.theclass(2002, 3, 4)
         self.assertEqual(t.strftime('%Y-%m-%d %H:%M:%S'), "2002-03-04 00:00:00")
 
+    def test_timetuple(self):
+        # If t.timetuple uses time.localtime instead of time.gmtime while west
+        # from GMT, the date will be incorrect.  If that happens east from GMT,
+        # the time will be nonzero.  If we test in GMT, we won't notice the bug.
+        t = self.theclass(2002, 3, 4)
+        self.assertEqual(t.timetuple()[:6], (2002, 3, 4, 0, 0, 0))
+
     def test_ctime(self):
         t = self.theclass(2002, 3, 2)
         self.assertEqual(t.ctime(), "Sat Mar  2 00:00:00 2002")
@@ -522,14 +529,6 @@
     def test_ctime(self):
         t = self.theclass(2002, 3, 2, 18, 3, 5, 123)
         self.assertEqual(t.ctime(), "Sat Mar  2 18:03:05 2002")
-
-    def test_timetuple(self):
-        # If t.timetuple uses time.localtime instead of time.gmtime while west
-        # from GMT, the date will be incorrect.  If that happens east from GMT,
-        # the time will be nonzero.  If we test in GMT, we won't notice the bug.
-        t = self.theclass(2002, 3, 4)
-        self.assertEqual(t.timetuple()[:6], (2002, 3, 4, 0, 0, 0))
-
 
 
 class FixedOffset(object):