]> granicus.if.org Git - python/commitdiff
Merged revisions 87222 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Tue, 14 Dec 2010 01:25:30 +0000 (01:25 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Tue, 14 Dec 2010 01:25:30 +0000 (01:25 +0000)
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.
........

Lib/test/test_time.py

index 4b5d703281226236628e90a02eb01eb4f80e9d44..eb4289f7194b08261493630f669e07c39b0de72e 100644 (file)
@@ -125,9 +125,9 @@ class TimeTestCase(unittest.TestCase):
         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