[py-dev] naming issues

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Fri Aug 3 11:33:33 CEST 2012

I dont like the name funcarg for those cases,
since its not really descriptive of what it is anymore

Naming things different from what they are
creates extra mental ballast i don't want to have

back when we only had funcargs, the name "funcarg" was descriptive,
now it isn't anymore, since we have a lot more

On 08/03/2012 11:15 AM, Ralf Schmitt wrote:
> holger krekel<holger at merlinux.eu>  writes:
>> On Fri, Aug 03, 2012 at 09:53 +0200, Ralf Schmitt wrote:
>>> holger krekel<holger at merlinux.eu>  writes:
>>>> If we are to optionally allow pytest_funcarg__ naming with @pytest.factory
>>>> i wonder if renaming @pytest.factory to @pytest.funcarg would make sense
>>>> and contribute to the notion that pytest-2.3 just extends funcarg
>>>> facilities.  The reason i favored @factory is that it really marks a
>>>> factory function whereas "funcarg" more denotes the argument in a test
>>>> or setup function.  Moreover, the pytest-2.2 documentation already talked
>>>> about factories when refering to pytest_funcarg__ functions.
>>>> (And @funcargfactory seems a tad long to me).
>>>> However, i can't claim to have much of an outside view so i am interested
>>>> in your and other opinions.
>>> +1 for @pytest.funcarg (mostly because I like to grep for it)
>> But that would work with "grep @pytest.factory" as well, wouldn't it?
> probably, but that doesn't give me old funcarg factory functions.
> I have to admit that I didn't read the proposals and didn't follow the
> discussion closely. Calling the thing factory might be too broad. If
> pytest.funcarg does make sense (and you said it does), I'm now +2 for
> it.
> And since it looks like this should just be a shorter name for
> funcargfactory, I think 'funcarg' carries more meaning.
> With my previous vote that makes it +3 :)

More information about the Pytest-dev mailing list