mirror of https://github.com/python/cpython
Issue #16840: Fixed test_tcl for Tcl < 8.5.
This commit is contained in:
parent
a5a4bd76fb
commit
2379d541dd
|
@ -145,7 +145,9 @@ class TclTest(unittest.TestCase):
|
|||
tcl = self.interp.tk
|
||||
for i in self.get_integers():
|
||||
self.assertEqual(tcl.getint(' %d ' % i), i)
|
||||
self.assertEqual(tcl.getint(' %#o ' % i), i)
|
||||
if tcl_version >= (8, 5):
|
||||
self.assertEqual(tcl.getint(' %#o ' % i), i)
|
||||
self.assertEqual(tcl.getint((' %#o ' % i).replace('o', '')), i)
|
||||
self.assertEqual(tcl.getint(' %#x ' % i), i)
|
||||
if tcl_version < (8, 5): # bignum was added in Tcl 8.5
|
||||
self.assertRaises(TclError, tcl.getint, str(2**1000))
|
||||
|
@ -422,9 +424,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):
|
||||
|
|
Loading…
Reference in New Issue