This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benjamin.peterson, gpolo, loewis, python-dev, serhiy.storchaka, vstinner
Date 2015-04-07.19:31:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
test_expr_bignum() should tolerate the long type:

FAIL: test_expr_bignum (test.test_tcl.TclTest)
Traceback (most recent call last):
  File "/Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/test/", 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'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:46vstinnersetrecipients: + vstinner, loewis, benjamin.peterson, gpolo, python-dev, serhiy.storchaka
2015-04-07 19:31:45vstinnersetmessageid: <>
2015-04-07 19:31:45vstinnerlinkissue16840 messages
2015-04-07 19:31:45vstinnercreate