From: Serhiy Storchaka Date: Mon, 7 Jul 2014 11:57:57 +0000 (+0300) Subject: Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. X-Git-Tag: v3.5.0a1~1332 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3cb4af8fbf17b6a0d6bf0ec92ae326f58eddee2a;p=thirdparty%2FPython%2Fcpython.git Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. --- 3cb4af8fbf17b6a0d6bf0ec92ae326f58eddee2a diff --cc Lib/test/test_tcl.py index 9c5d97452bf1,01b532da1141..5691658643ed --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@@ -406,15 -406,11 +406,13 @@@ 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']]), + ('a', ('b', 'c')) if self.wantobjects else 'a {b c}') def test_user_command(self): result = None @@@ -458,10 -452,9 +454,10 @@@ 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} {}') def test_splitlist(self): splitlist = self.interp.tk.splitlist