[Python-checkins] cpython (2.7): Issue #16840: Fixed test_tcl for Tcl < 8.5.

serhiy.storchaka python-checkins at python.org
Thu Apr 2 19:08:09 CEST 2015


https://hg.python.org/cpython/rev/9905fb0b5885
changeset:   95395:9905fb0b5885
branch:      2.7
parent:      95392:77e5623e22dd
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Apr 02 20:06:48 2015 +0300
summary:
  Issue #16840: Fixed test_tcl for Tcl < 8.5.

files:
  Lib/test/test_tcl.py |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -144,6 +144,8 @@
             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 @@
                 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):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list