Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_time.py @ 66883:7f8cdcfbb08e 3.1
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.
........
| author | R. David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Tue, 14 Dec 2010 01:25:30 +0000 |
| parents | 2beb25369289 |
| children | f89e37cd6c65 |
line wrap: on
line diff
--- a/Lib/test/test_time.py Mon Dec 13 23:57:01 2010 +0000 +++ b/Lib/test/test_time.py Tue Dec 14 01:25:30 2010 +0000 @@ -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
