[Zope3-checkins] SVN: Zope3/trunk/src/zope/i18n/tests/test_formats.py Make the test do all of what I intended, not just part.

Gary Poster gary at zope.com
Tue Dec 20 12:49:19 EST 2005


Log message for revision 40912:
  Make the test do all of what I intended, not just part.
  
  

Changed:
  U   Zope3/trunk/src/zope/i18n/tests/test_formats.py

-=-
Modified: Zope3/trunk/src/zope/i18n/tests/test_formats.py
===================================================================
--- Zope3/trunk/src/zope/i18n/tests/test_formats.py	2005-12-20 16:23:02 UTC (rev 40911)
+++ Zope3/trunk/src/zope/i18n/tests/test_formats.py	2005-12-20 17:49:19 UTC (rev 40912)
@@ -293,13 +293,13 @@
 
     def testParseTimeZone(self):
         dt = self.format.parse('09:48 -600', 'HH:mm z')
-        pickle.loads(pickle.dumps(dt)) == dt
+        self.assertEqual(pickle.loads(pickle.dumps(dt)), dt)
         self.assertEqual(dt.tzinfo.utcoffset(dt), datetime.timedelta(hours=-6))
         self.assertEqual(dt.tzinfo.zone, None)
         self.assertEqual(dt.tzinfo.tzname(dt), None)
 
         dt = self.format.parse('09:48 -06:00', 'HH:mm zz')
-        pickle.loads(pickle.dumps(dt)) == dt
+        self.assertEqual(pickle.loads(pickle.dumps(dt)), dt)
         self.assertEqual(dt.tzinfo.utcoffset(dt), datetime.timedelta(hours=-6))
         self.assertEqual(dt.tzinfo.zone, None)
         self.assertEqual(dt.tzinfo.tzname(dt), None)
@@ -309,14 +309,14 @@
         # interpretation (other countries also use the EST timezone
         # abbreviation)
         dt = self.format.parse('01.01.2003 09:48 EST', 'dd.MM.yyyy HH:mm zzz')
-        pickle.loads(pickle.dumps(dt)) == dt
+        self.assertEqual(pickle.loads(pickle.dumps(dt)), dt)
         self.assertEqual(dt.tzinfo.utcoffset(dt), datetime.timedelta(hours=-5))
         self.assertEqual(dt.tzinfo.zone, 'EST')
         self.assertEqual(dt.tzinfo.tzname(dt), 'EST')
 
         dt = self.format.parse('01.01.2003 09:48 US/Eastern',
                                'dd.MM.yyyy HH:mm zzzz')
-        pickle.loads(pickle.dumps(dt)) == dt
+        self.assertEqual(pickle.loads(pickle.dumps(dt)), dt)
         self.assertEqual(dt.tzinfo.utcoffset(dt), datetime.timedelta(hours=-5))
         self.assertEqual(dt.tzinfo.zone, 'US/Eastern')
         self.assertEqual(dt.tzinfo.tzname(dt), 'EST')



More information about the Zope3-Checkins mailing list