[py-dev] naming issues
Ralf Schmitt
ralf at systemexit.de
Fri Aug 3 11:15:33 CEST 2012
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 :)
--
Cheers
Ralf
More information about the Pytest-dev
mailing list