]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl.
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 7 Jul 2014 11:57:57 +0000 (14:57 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 7 Jul 2014 11:57:57 +0000 (14:57 +0300)
1  2 
Lib/test/test_tcl.py

index 9c5d97452bf17c2e947a3ceb6e9fe99fd8a28397,01b532da11415638249510c407150964948d2fcb..5691658643ed6518d591acadf3f4c67831dfd743
@@@ -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
              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