]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #16840: Fixed test_tcl for Tcl < 8.5.
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 2 Apr 2015 17:06:48 +0000 (20:06 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 2 Apr 2015 17:06:48 +0000 (20:06 +0300)
Lib/test/test_tcl.py

index 927b0e3c90fdf65b2eb66fcb6bc6149e11d6ab92..ff1568b6071ed9fbf8a8e9f96371fd8e52f64da5 100644 (file)
@@ -144,6 +144,8 @@ class TclTest(unittest.TestCase):
             result = tcl.getint(' %d ' % i)
             self.assertEqual(result, i)
             self.assertIsInstance(result, type(int(result)))
+            if tcl_version >= (8, 5):
+                self.assertEqual(tcl.getint(' {:#o} '.format(i)), i)
             self.assertEqual(tcl.getint(' %#o ' % i), i)
             self.assertEqual(tcl.getint(' %#x ' % i), i)
         if tcl_version < (8, 5):  # bignum was added in Tcl 8.5
@@ -438,9 +440,7 @@ class TclTest(unittest.TestCase):
                 self.assertEqual(result, str(i))
                 self.assertIsInstance(result, str)
         if tcl_version < (8, 5):  # bignum was added in Tcl 8.5
-            result = tcl.call('expr', str(2**1000))
-            self.assertEqual(result, str(2**1000))
-            self.assertIsInstance(result, str)
+            self.assertRaises(TclError, tcl.call, 'expr', str(2**1000))
 
     def test_passing_values(self):
         def passValue(value):