From e4d536e60900dfb8cd9c9ef9f7a2cf24d5d5839e Mon Sep 17 00:00:00 2001
From: Daira Hopwood <daira@jacaranda.org>
Date: Fri, 5 Feb 2016 20:04:43 +0000
Subject: [PATCH] Avoid spurious SUCCESS!?? for test_format_time_y2038.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---
 src/allmydata/test/test_util.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py
index 25b65615..69d3c747 100644
--- a/src/allmydata/test/test_util.py
+++ b/src/allmydata/test/test_util.py
@@ -1006,9 +1006,10 @@ class TimeFormat(unittest.TestCase, TimezoneMixin):
     def test_format_time_y2038(self):
         seconds_per_day = 60*60*24
         leap_years_1970_to_2047_inclusive = ((2044 - 1968) // 4)
-        self.failUnlessEqual(time_format.format_time(time.gmtime(seconds_per_day*((2048 - 1970)*365+leap_years_1970_to_2047_inclusive))), '2048-01-01 00:00:00')
-
-    test_format_time_y2038.todo = "This test is known to fail on systems with 32-bit time_t."
+        try:
+            self.failUnlessEqual(time_format.format_time(time.gmtime(seconds_per_day*((2048 - 1970)*365+leap_years_1970_to_2047_inclusive))), '2048-01-01 00:00:00')
+        except unittest.FailTest:
+            raise unittest.SkipTest("Note: this system cannot handle dates after 2037.")
 
     def test_format_delta(self):
         time_1 = 1389812723
-- 
2.45.2