mirror of https://github.com/python/cpython
Issue #21526: Fixed the test_booleans test for wantobjects = 0.
This commit is contained in:
commit
b7616621db
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue