diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-02 08:47:51 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-02 08:47:51 (GMT) |
commit | b7616621db9bc8b47a6b8ee34e185ff9cc500362 (patch) | |
tree | 628146bfe83ba08756a0a9dd5b916cca997a6e75 /Lib/test/test_tcl.py | |
parent | b452f41cc82a9627d9a29b5ff6853af06ed3083f (diff) | |
parent | 9171fe5a1dfe74f381a0ec8648568b5d04fa0664 (diff) | |
download | cpython-b7616621db9bc8b47a6b8ee34e185ff9cc500362.zip cpython-b7616621db9bc8b47a6b8ee34e185ff9cc500362.tar.gz cpython-b7616621db9bc8b47a6b8ee34e185ff9cc500362.tar.bz2 |
Issue #21526: Fixed the test_booleans test for wantobjects = 0.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r-- | Lib/test/test_tcl.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index ad62671..1e6ac66 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -382,8 +382,12 @@ class TclTest(unittest.TestCase): tcl = self.interp def check(expr, expected): result = tcl.call('expr', expr) - self.assertEqual(result, expected) - self.assertIsInstance(result, int) + if tcl.wantobjects(): + self.assertEqual(result, expected) + self.assertIsInstance(result, int) + else: + self.assertIn(result, (expr, str(int(expected)))) + self.assertIsInstance(result, str) check('true', True) check('yes', True) check('on', True) |