[Python-checkins] r87222 - python/branches/py3k/Lib/test/test_time.py
r.david.murray
python-checkins at python.org
Tue Dec 14 02:22:50 CET 2010
Author: r.david.murray
Date: Tue Dec 14 02:22:50 2010
New Revision: 87222
Log:
Use skipIf instead of a return when attribute doesn't exist.
Modified:
python/branches/py3k/Lib/test/test_time.py
Modified: python/branches/py3k/Lib/test/test_time.py
==============================================================================
--- python/branches/py3k/Lib/test/test_time.py (original)
+++ python/branches/py3k/Lib/test/test_time.py Tue Dec 14 02:22:50 2010
@@ -126,9 +126,9 @@
def test_asctime_bounding_check(self):
self._bounds_checking(time.asctime)
+ @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