Message240224
test_expr_bignum() should tolerate the long type:
http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/3007/steps/test/logs/stdio
======================================================================
FAIL: test_expr_bignum (test.test_tcl.TclTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/test/test_tcl.py", line 443, in test_expr_bignum
self.assertIsInstance(result, type(int(result)))
AssertionError: -2147483648L is not an instance of <type 'int'>
In fact, I don't understand the test self.assertIsInstance(result, type(int(result))). What do you expect from type(int(x)): int or long depending on the value of x? The problem is that an intermediate result may be a long and so tcl.call('expr', ..) returns a long even if it may fit into a small int.
I suggest to simply drop the test self.assertIsInstance(result, type(int(result))). |
|
Date |
User |
Action |
Args |
2015-04-07 19:31:46 | vstinner | set | recipients:
+ vstinner, loewis, benjamin.peterson, gpolo, python-dev, serhiy.storchaka |
2015-04-07 19:31:45 | vstinner | set | messageid: <1428435105.98.0.213059374787.issue16840@psf.upfronthosting.co.za> |
2015-04-07 19:31:45 | vstinner | link | issue16840 messages |
2015-04-07 19:31:45 | vstinner | create | |
|