]> granicus.if.org Git - python/commitdiff
If time.tzset doesn't exist, don't test it.
authorGuido van Rossum <guido@python.org>
Sat, 15 Mar 2003 12:01:52 +0000 (12:01 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 15 Mar 2003 12:01:52 +0000 (12:01 +0000)
Lib/test/test_time.py

index 4459f3e02b1360445140d2fc6a5073c9b490dac2..17d4806ecbf11b4bb3c9aba1bbfe755025a85d3d 100644 (file)
@@ -53,6 +53,9 @@ class TimeTestCase(unittest.TestCase):
         self.assertRaises(TypeError, time.asctime, 0)
 
     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
 
         # Epoch time of midnight Dec 25th 2002. Never DST in northern