From: Serhiy Storchaka Date: Mon, 7 Jul 2014 11:47:17 +0000 (+0300) Subject: Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fc570fc7eb706bb98da3a6343aa94c8f33d702e;p=python Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. --- diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index 593953f3a1..d8dc9c300e 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -420,11 +420,9 @@ class TclTest(unittest.TestCase): self.assertEqual(passValue(float('inf')), float('inf')) self.assertEqual(passValue(-float('inf')), -float('inf')) else: - f = passValue(float('nan')) - self.assertIsInstance(f, str) - self.assertEqual(f.lower()[:3], 'nan') self.assertEqual(float(passValue(float('inf'))), float('inf')) self.assertEqual(float(passValue(-float('inf'))), -float('inf')) + # XXX NaN representation can be not parsable by float() self.assertEqual(passValue((1, '2', (3.4,))), (1, '2', (3.4,)) if self.wantobjects else '1 2 3.4') @@ -449,8 +447,6 @@ class TclTest(unittest.TestCase): expected = float(expected) self.assertAlmostEqual(float(actual), expected, delta=abs(expected) * 1e-10) - def starts_with(actual, expected): - self.assertEqual(actual.lower()[:len(expected)], expected) check(True, '1') check(False, '0') @@ -474,7 +470,7 @@ class TclTest(unittest.TestCase): check(f, f, eq=float_eq) check(float('inf'), 'Inf', eq=float_eq) check(-float('inf'), '-Inf', eq=float_eq) - check(float('nan'), 'nan', eq=starts_with) + # XXX NaN representation can be not parsable by float() check((), '') check((1, (2,), (3, 4), '5 6', ()), '1 2 {3 4} {5 6} {}')