summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-04-29 22:16:46 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-04-29 22:16:46 (GMT)
commitb8f02b5a5f1d211d83d6cc2a40a9b798d8dcfee2 (patch)
tree3db581d8da8c896b2eae4c67d49dff9e347fdf76 /Lib
parent407b3bd89b877c198bf9cdbf290ddb91b49910b5 (diff)
downloadcpython-b8f02b5a5f1d211d83d6cc2a40a9b798d8dcfee2.zip
cpython-b8f02b5a5f1d211d83d6cc2a40a9b798d8dcfee2.tar.gz
cpython-b8f02b5a5f1d211d83d6cc2a40a9b798d8dcfee2.tar.bz2
fixed test_imaplib failure on Win
Diffstat (limited to 'Lib')
-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 0526b14..79293ed 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1027,12 +1027,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: