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 chris.jerdonek
Recipients chris.jerdonek, ezio.melotti
Date 2012-09-25.13:28:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za>
In-reply-to
Content
The built-in function int() does not seem to have any basic unit tests (e.g. in test_builtin).  It would be good to add some.

Some cases (including edge cases) for possible inclusion:

int()
int(base='foo')  # no exception; returns 0
int(x=5)
int(x=5, base=10)  # raises TypeError
int(5.8)  # test truncation towards zero
int(-5.8)  # ditto
int('5.8')  # raises ValueError

Both positional and keyword argument combinations should be tested.
History
Date User Action Args
2012-09-25 13:28:42chris.jerdoneksetrecipients: + chris.jerdonek, ezio.melotti
2012-09-25 13:28:42chris.jerdoneksetmessageid: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za>
2012-09-25 13:28:41chris.jerdoneklinkissue16045 messages
2012-09-25 13:28:41chris.jerdonekcreate