That's a bug and it wasn't known until now. :-) Now tracking on
https://bugs.launchpad.net/pythoscope/+bug/440773
For now I would suggest to manually (or rather - using your favourite
editor ;-) get rid of those params=(...), so your tests pass.
Cheers,
mk
>
> On Fri, Oct 2, 2009 at 8:12 PM, ssteinerX <sste...@gmail.com> wrote:
>> One of my functions has the signature:
>>
>> def build_url(*params):
>> pass
>>
>> When I called the function with a list, like so, in a points-of-
>> entry file, the following test code was generated:
>>
>> def test_build_url_returns_thisisa_for_tuple(self):
>> self.assertEqual('this/is/a', build_url(params=('', 'this',
>> 'is', 'a')))
>>
>> Unfortunately, using a keyword parameter like that causes this:
>>
>> ERROR: test_build_url_returns_thisisatest_for_tuple
>> (wssw_urlutils.tests.test_url_util.TestBuildUrl)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/Users/ssteiner/.../test_url_util.py", line 29, in
>> test_build_url_returns_thisisatest_for_tuple
>> self.assertEqual('this/is/a/test', build_url(params=((' this ',
>> ' \r\nis \r\n', '\t\r\n a\r\n\t', ' test '),)))
>> TypeError: build_url() got an unexpected keyword argument 'params'
>>
>> So...is this a known issue and, is there a work-around?
>
> That's a bug and it wasn't known until now. :-) Now tracking on
> https://bugs.launchpad.net/pythoscope/+bug/440773
Cool. Want my test case?
> For now I would suggest to manually (or rather - using your favourite
> editor ;-) get rid of those params=(...), so your tests pass.
That's what I did, thanks.
S
The sample code you provided was enough to reproduce the problem.
Issue is now fixed in trunk, thanks again for the report!
Cheers,
mk