cboos  committed 453ec8f

Skip on unit-test that can't work on some versions of Windows (follow-up to r9789)

  • Participants
  • Parent commits ae83aff
  • Branches trunk

Comments (0)

Files changed (1)

File trac/util/tests/

 # Author: Matt Good <>
 import datetime
+import os
 import unittest
 from trac.util import datefmt
         self.assertEqual(datefmt.to_datetime(2345678912L), expected)
         self.assertEqual(datefmt.to_datetime(2345678912.0), expected)
+    def test_to_datetime_microsecond_negative_timestamps(self):
         expected = datetime.datetime.fromtimestamp(-2345.678912,
         self.assertEqual(datefmt.to_datetime(-2345678912), expected)
         self.assertEqual(datefmt.to_datetime(-2345678912L), expected)
         self.assertEqual(datefmt.to_datetime(-2345678912.0), expected)
+    if == 'nt':
+        del test_to_datetime_microsecond_negative_timestamps
+        # negative timestamps not supported on Windows:
+        # ValueError: timestamp out of range for platform localtime()/gmtime()
     def test_to_datetime_can_convert_dates(self):
         expected = datetime.datetime(2009, 5, 2, tzinfo=datefmt.localtz)