]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/test/test_util.py
Fix tests on platforms without time.tzset (e.g. Windows). fixes ticket:2725
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / test / test_util.py
index 25b656156ee1cec51752e0f29b5a0ef98c7d1eac..be5541e8852d79f8a3a5672652709af8851fa241 100644 (file)
@@ -932,6 +932,10 @@ class TimeFormat(unittest.TestCase, TimezoneMixin):
         # time_format.iso_utc_time_to_localseconds() breaks if the timezone is
         # Europe/London.  (As soon as this unit test is done then I'll change
         # that implementation to something that works even in this case...)
+
+        if not self.have_working_tzset():
+            raise unittest.SkipTest("This test can't be run on a platform without time.tzset().")
+
         self.setTimezone("Europe/London")
         return self._help_test_epoch()