Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-24 Thread Serhiy Storchaka
On 23.12.12 22:03, Terry Reedy wrote: I think the above behavior is buggy and should be changed rather than frozen into CPython with a test. According to the docs, PyPy does it right. http://bugs.python.org/issue16761 ___ Python-Dev mailing list Pyt

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-23 Thread Chris Jerdonek
On Sun, Dec 23, 2012 at 6:19 PM, Terry Reedy wrote: > On 12/23/2012 4:47 PM, Chris Jerdonek wrote: >> On Sun, Dec 23, 2012 at 12:03 PM, Terry Reedy wrote: >>> +# For example, PyPy 1.9.0 raised TypeError for these cases because it +# expects x to be a string if base is given

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-23 Thread Terry Reedy
On 12/23/2012 4:47 PM, Chris Jerdonek wrote: On Sun, Dec 23, 2012 at 12:03 PM, Terry Reedy wrote: +# For example, PyPy 1.9.0 raised TypeError for these cases because it +# expects x to be a string if base is given. +@support.cpython_only +def test_base_arg_with_no_x_arg(self):

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-23 Thread Chris Jerdonek
On Sun, Dec 23, 2012 at 12:03 PM, Terry Reedy wrote: > >> +# For example, PyPy 1.9.0 raised TypeError for these cases because it >> +# expects x to be a string if base is given. >> +@support.cpython_only >> +def test_base_arg_with_no_x_arg(self): >> +self.assertEquals(int(b

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-23 Thread Terry Reedy
+# For example, PyPy 1.9.0 raised TypeError for these cases because it +# expects x to be a string if base is given. +@support.cpython_only +def test_base_arg_with_no_x_arg(self): +self.assertEquals(int(base=6), 0) +# Even invalid bases don't raise an exception. +