[Python-checkins] cpython (3.4): Issue #21526: Fixed the test_booleans test for wantobjects = 0.
serhiy.storchaka
python-checkins at python.org
Thu Apr 2 10:48:22 CEST 2015
https://hg.python.org/cpython/rev/4255ca2f5314
changeset: 95373:4255ca2f5314
branch: 3.4
parent: 95369:de3496cd609e
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Apr 02 11:46:07 2015 +0300
summary:
Issue #21526: Fixed the test_booleans test for wantobjects = 0.
files:
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
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -382,8 +382,12 @@
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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list