[pytest-dev] Parametrizing dependent fixtures

Edgar Ostrowski edgar.ostrowski at gmail.com
Mon Jan 8 07:32:24 EST 2018


Hello pytest team!

Recently I've came across a talk about pytest by Gabe Hollombe
https://youtu.be/RcN26hznmk4

One thing that he mentioned really caught my eye. Close to the end of the
talk he speaks about parametrizing dependent fixtures by using
@pytest.mark.parametrize. Here is link to that moment:
https://youtu.be/RcN26hznmk4?t=2397

This looks like a very helpful feature. I tired it out on my own and yes it
works: https://gist.github.com/Kanguros/e455901f5b940098d1d18628a27cbdb2

Unfortunately I could not find anything about this in the docs. Or maybe
I'm just reading them in the wrong way. Anyway I would like to confirm that
this is valid way of using the parametrize marker. Does this have any
drawbacks? Is it reliable? Up till now I've only been aware of
parametrizing fixtures using @pytest.fixture(params=...)

Keep up the great work and thank you.
Edgar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20180108/cb9334e3/attachment.html>


More information about the pytest-dev mailing list