On 20.10.2016 09:17, Florian Bruhin wrote:
> * Ronny Pfannschmidt <opensou...@ronnypfannschmidt.de> [2016-10-20 09:07:47 
> +0200]:
>>> Finally, and I only just remembered, Holger has some lingering code
>>> somewhere which does something like:
>>>
>>> @pytest.marker
>>> def blocker(n):
>>>     return {'issue no': int(n)}  # or whatever object you want your marker 
>>> to be
>>>
>>> @pytest.mark.blocker(123)
>>> def test_fun():
>>>     pass
>> fixtures and markers are not symmetric and i don't see a reason to make
>> them be
>> just for looking similar, currently they are *completely* different ,
>> and i think that bringing them closer to look more nice will make things
>> MUCH worse.
>> they are belonging to different categories of "things" with completely
>> different desired behaviours.
> Then don't think of them like fixtures - but markers are essentially
> *functions*. They have arguments and keyword arguments, and currently
> everything defining a marker with arguments has to do the
> parsing/validating by itself. Holger's proposal seemed to clean this
> up and make things a lot easier.

from my pov thats **completely** wrong ,
a marker is an *object carrying metadata*
currently we use a own mechanism to make them, and a own mechanism to
validate them
and we don't even pass them correctly to a test item (and neither can we
without intentionally breaking the current apis)

from my pov we are just creating useless code with error potential if we
don't just make them plain simple objects
holgers proposal creates a whole name-spacing and parsing layer for
virtually no added benefit over just having a class
and it carries a certain guarantee for later issues

literally every single time we did something like that it ended with
bugs that stayed in for 5+ years
because nobody could fix them in reasonable time without breaking the api

sometimes it even was completely impossible to fix


-- Ronny
> Florian
>
>
>
> _______________________________________________
> pytest-dev mailing list
> pytest-dev@python.org
> https://mail.python.org/mailman/listinfo/pytest-dev

_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to