diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-12-14 01:22:50 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-12-14 01:22:50 (GMT) |
commit | 6ecf76ea3617dc32ce7fcba732e2ee9fb48b1e30 (patch) | |
tree | ac7291a288601df786994801794175333b37b4dc /Lib/test | |
parent | 4d55bf9fcc1acea845e843f52540198f81fe0359 (diff) | |
download | cpython-6ecf76ea3617dc32ce7fcba732e2ee9fb48b1e30.zip cpython-6ecf76ea3617dc32ce7fcba732e2ee9fb48b1e30.tar.gz cpython-6ecf76ea3617dc32ce7fcba732e2ee9fb48b1e30.tar.bz2 |
Use skipIf instead of a return when attribute doesn't exist.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_time.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index eaa4e83..600d476 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -126,9 +126,9 @@ class TimeTestCase(unittest.TestCase): 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 |