diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-02 17:06:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-02 17:06:48 (GMT) |
commit | 61ad42e591ac7c142f3fcb62ca85813c1ffb703c (patch) | |
tree | a5f0ceda837e862477385d0be5c6a57c58ef3a8d | |
parent | e8ae0473cdf64d1244f472b28ec08202f32acc0e (diff) | |
download | cpython-61ad42e591ac7c142f3fcb62ca85813c1ffb703c.zip cpython-61ad42e591ac7c142f3fcb62ca85813c1ffb703c.tar.gz cpython-61ad42e591ac7c142f3fcb62ca85813c1ffb703c.tar.bz2 |
Issue #16840: Fixed test_tcl for Tcl < 8.5.
-rw-r--r-- | 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 index 927b0e3..ff1568b 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -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): |