diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-02 17:07:24 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-02 17:07:24 (GMT) |
commit | b162914158e9bdf95adaade548b43519110c3ba3 (patch) | |
tree | 53e90bfa1b6d86d89f4451d91df356b4896a4445 /Lib | |
parent | 9fe562b4996caa2caf2942d8daca56baf613b966 (diff) | |
parent | 2379d541dd2a4944713999f0071d53fdddee3d47 (diff) | |
download | cpython-b162914158e9bdf95adaade548b43519110c3ba3.zip cpython-b162914158e9bdf95adaade548b43519110c3ba3.tar.gz cpython-b162914158e9bdf95adaade548b43519110c3ba3.tar.bz2 |
Issue #16840: Fixed test_tcl for Tcl < 8.5.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_tcl.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index f675032..6fd2d07 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -143,7 +143,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)) @@ -420,9 +422,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): |