Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3d082c

Browse files
committed
Merged revisions 87222 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent ccb9d05 commit f3d082c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ def test_asctime(self):
125125
time.asctime(time.gmtime(self.t))
126126
self.assertRaises(TypeError, time.asctime, 0)
127127

128+
@unittest.skipIf(not hasattr(time, "tzset"),
129+
"time module has no attribute tzset")
128130
def test_tzset(self):
129-
if not hasattr(time, "tzset"):
130-
return # Can't test this; don't want the test suite to fail
131131

132132
from os import environ
133133

0 commit comments

Comments
 (0)