From: R. David Murray Date: Tue, 14 Dec 2010 01:28:59 +0000 (+0000) Subject: Merged revisions 87222 via svnmerge from X-Git-Tag: v2.7.2rc1~486 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe3b4377cd9df3662f110a12a0b2a2bcea106893;p=python 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. ........ --- diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index a1029fd519..c991b50559 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -115,9 +115,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