Kaydet (Commit) 9171fe5a authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #21526: Fixed the test_booleans test for wantobjects = 0.

üst f7de3dd0
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment