summaryrefslogtreecommitdiffstats
path: root/Lib/test/support.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-04-29 22:20:05 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-04-29 22:20:05 (GMT)
commit934cb18ef5fc99557ab61ec42748e4d4bd6ac6f3 (patch)
tree30d573d4f05dbcfa596806908c366da7a93813e0 /Lib/test/support.py
parenta6df2ee7d084f830f100a5bd563005389d7d20c4 (diff)
parentb8f02b5a5f1d211d83d6cc2a40a9b798d8dcfee2 (diff)
downloadcpython-934cb18ef5fc99557ab61ec42748e4d4bd6ac6f3.zip
cpython-934cb18ef5fc99557ab61ec42748e4d4bd6ac6f3.tar.gz
cpython-934cb18ef5fc99557ab61ec42748e4d4bd6ac6f3.tar.bz2
merged
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r--Lib/test/support.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index a7d0833..6c96501 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1106,12 +1106,16 @@ def run_with_locale(catstr, *locales):
def run_with_tz(tz):
def decorator(func):
def inner(*args, **kwds):
+ try:
+ tzset = time.tzset
+ except AttributeError:
+ raise unittest.SkipTest("tzset required")
if 'TZ' in os.environ:
orig_tz = os.environ['TZ']
else:
orig_tz = None
os.environ['TZ'] = tz
- time.tzset()
+ tzset()
# now run the function, resetting the tz on exceptions
try: