summaryrefslogtreecommitdiff
path: root/Lib/test/datetimetester.py
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2010-12-04 15:17:38 +0000
committerEric Smith <eric@trueblade.com>2010-12-04 15:17:38 +0000
commit3ab08cadaebd694533edee03ad2b4eba2055d4e3 (patch)
tree800efe09ec68445facc140614c7c7420a51c80a4 /Lib/test/datetimetester.py
parent932e49e3946901f3e2d05f25e407b6be84dac161 (diff)
downloadcpython-git-3ab08cadaebd694533edee03ad2b4eba2055d4e3.tar.gz
Issue #10624: Use support.requires_IEEE_754 in all appropriate tests.
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r--Lib/test/datetimetester.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index e91eb673a4..48e5095f3d 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -38,11 +38,6 @@ OTHERSTUFF = (10, 34.5, "abc", {}, [], ())
INF = float("inf")
NAN = float("nan")
-# decorator for skipping tests on non-IEEE 754 platforms
-requires_IEEE_754 = unittest.skipUnless(
- float.__getformat__("double").startswith("IEEE"),
- "test requires IEEE 754 doubles")
-
#############################################################################
# module tests
@@ -407,7 +402,7 @@ class TestTimeDelta(HarmlessMixedComparison, unittest.TestCase):
self.assertRaises(ZeroDivisionError, lambda: a / 0.0)
self.assertRaises(TypeError, lambda: a / '')
- @requires_IEEE_754
+ @support.requires_IEEE_754
def test_disallowed_special(self):
a = timedelta(42)
self.assertRaises(ValueError, a.__mul__, NAN)
@@ -589,7 +584,7 @@ class TestTimeDelta(HarmlessMixedComparison, unittest.TestCase):
self.assertRaises(OverflowError, day.__truediv__, 1e-10)
self.assertRaises(OverflowError, day.__truediv__, 9e-10)
- @requires_IEEE_754
+ @support.requires_IEEE_754
def _test_overflow_special(self):
day = timedelta(1)
self.assertRaises(OverflowError, day.__mul__, INF)