[issue16045] add more unit tests for built-in int()

2012-12-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb1734e579f7 by Chris Jerdonek in branch '2.7': Issue #16790: add some of the recent issue #16045 int tests to test_long. http://hg.python.org/cpython/rev/eb1734e579f7 -- ___ Python tracker

[issue16045] add more unit tests for built-in int()

2012-12-23 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue16045] add more unit tests for built-in int()

2012-12-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Committed. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue16045] add more unit tests for built-in int()

2012-12-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c502a2dc0345 by Andrew Svetlov in branch '2.7': Issue #16045: add more unit tests for built-in int() http://hg.python.org/cpython/rev/c502a2dc0345 New changeset a90d7003966e by Andrew Svetlov in branch '3.3': Issue #16045: add more unit tests for bu

[issue16045] add more unit tests for built-in int()

2012-12-23 Thread Anton Kasyanov
Anton Kasyanov added the comment: looks good to me -- nosy: +asvetlov, mindmaster ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16045] add more unit tests for built-in int()

2012-09-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: Adding patch modified for 2.7. Here are the differences I found from 3.3. Unlike 3.3-- (1) 2.7 does not accept bytearrays for x (though it accepts str/bytes). (2) 2.7 raises a TypeError if passed a string base without providing x. Is it acceptable to add tes

[issue16045] add more unit tests for built-in int()

2012-09-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching first version of patch. Interestingly, not all of these pass when I tried applying to 2.7. For example, >>> int(base='foo') Traceback (most recent call last): File "", line 1, in TypeError: an integer is required So at least one modification wil

[issue16045] add more unit tests for built-in int()

2012-09-27 Thread Chris Jerdonek
Chris Jerdonek added the comment: >From http://bugs.python.org/review/16036/ for issue 16036: > Somewhere should be exposed that x must be str, bytes, bytearray or a > subclass. We can add tests for this, too (if not already there). -- ___ Python t

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Good thought. Here is one data point: $ pypy Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:11) [PyPy 1.9.0] on darwin Type "help", "copyright", "credits" or "license" for more information. int() 0 int(x='10', base=8) 8 >>>

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Ezio Melotti
Ezio Melotti added the comment: Before adding tests (and possibly documentation) for edge cases like > int(base='foo') # no exception; returns 0 I'd take a look at what other implementations do. If they do something different we might still decide to keep the tests and mark them as cpython-

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: We should also add a code-comment pointer in test_builtin to test_int (where test_int() would be located). -- ___ Python tracker ___ __

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: [Reopening] Actually, there may still be value in this. Not all of the edge cases I mentioned are covered (e.g. calling using keyword arguments). -- resolution: invalid -> stage: committed/rejected -> test needed status: closed -> open title: create s