mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Use skipIf instead of a return when attribute doesn't exist.
This commit is contained in:
parent
4d55bf9fcc
commit
6ecf76ea36
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue