Commits

Alexander Belopolsky committed f23222d

fixed test_imaplib failure on Win

  • Participants
  • Parent commits b7e491b
  • Branches 3.2

Comments (0)

Files changed (1)

Lib/test/support.py

 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: