summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-07 11:57:57 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-07 11:57:57 (GMT)
commit3cb4af8fbf17b6a0d6bf0ec92ae326f58eddee2a (patch)
tree111cf3283bff4070611fcceb5df090d6dd284134
parentf2c4ba120767e0e627844c2d8397462b5b2b86ca (diff)
parent6f1435c939f1c2a2a1a835d8c48e085be1d82682 (diff)
downloadcpython-3cb4af8fbf17b6a0d6bf0ec92ae326f58eddee2a.zip
cpython-3cb4af8fbf17b6a0d6bf0ec92ae326f58eddee2a.tar.gz
cpython-3cb4af8fbf17b6a0d6bf0ec92ae326f58eddee2a.tar.bz2
Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl.
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 9c5d974..5691658 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -406,11 +406,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')
self.assertEqual(passValue(['a', ['b', 'c']]),
@@ -434,8 +432,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')
@@ -458,7 +454,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} {}')
check([1, [2,], [3, 4], '5 6', []], '1 2 {3 4} {5 6} {}')