[Python-checkins] r87223 - in python/branches/release31-maint: Lib/test/test_time.py

r.david.murray python-checkins at python.org
Tue Dec 14 02:25:30 CET 2010


Author: r.david.murray
Date: Tue Dec 14 02:25:30 2010
New Revision: 87223

Log:
Merged revisions 87222 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87222 | r.david.murray | 2010-12-13 20:22:50 -0500 (Mon, 13 Dec 2010) | 2 lines
  
  Use skipIf instead of a return when attribute doesn't exist.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/test/test_time.py

Modified: python/branches/release31-maint/Lib/test/test_time.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_time.py	(original)
+++ python/branches/release31-maint/Lib/test/test_time.py	Tue Dec 14 02:25:30 2010
@@ -125,9 +125,9 @@
         time.asctime(time.gmtime(self.t))
         self.assertRaises(TypeError, time.asctime, 0)
 
+    @unittest.skipIf(not hasattr(time, "tzset"),
+        "time module has no attribute tzset")
     def test_tzset(self):
-        if not hasattr(time, "tzset"):
-            return # Can't test this; don't want the test suite to fail
 
         from os import environ
 


More information about the Python-checkins mailing list