Curious. I'm rather reluctant to tell people to use or rely on this however. Which I guess is the actual question that was asked. ;-) To me this seems like an implementation detail of the mark.parametrize decorator.
Besides, is it really a good idea to make your parametrisation so indirect? I think you're breaking the abstraction fixtures are trying to create for you: You request the fixture and you should not be caring about how to create it, about whether is uses other fixtures to create itself and whether or not it is parametrised. I know there are exceptions to all rules, but it's a good design consideration to think about before constructing many intricately and tightly coupled dependencies. Regards, Floris "Geiger, Davin" <davin.gei...@intel.com> writes: > A disadvantage could be that the fixture code (of the depended fixture) will > not be executed. > > This means no preparation and cleanup steps are executed. > > From: pytest-dev > [mailto:pytest-dev-bounces+davin.geiger=intel....@python.org] On Behalf Of > Ronny Pfannschmidt > Sent: Monday, January 8, 2018 14:36 > To: Bruno Oliveira <nicodde...@gmail.com> > Cc: Edgar Ostrowski <edgar.ostrow...@gmail.com>; pytest-dev > <pytest-dev@python.org> > Subject: Re: [pytest-dev] Parametrizing dependent fixtures > > Hi, > > my understanding is, that the direct parametrization replaces the fixture > lookup for the involved tests, > which is not a planned "feature" per se, but still a neat tool to have > > -- Ronny > > 2018-01-08 14:07 GMT+01:00 Bruno Oliveira > <nicodde...@gmail.com<mailto:nicodde...@gmail.com>>: > Hi Edgar, > > On Mon, Jan 8, 2018 at 10:32 AM Edgar Ostrowski > <edgar.ostrow...@gmail.com<mailto:edgar.ostrow...@gmail.com>> wrote: > Anyway I would like to confirm that this is valid way of using the > parametrize marker. > > I did not look at the video yet, but fixture parametrization only works by > using @pytest.fixture(params=...). Markers don't do anything when applying to > fixtures. > > Hope that clarifies things! > > Cheers, > Bruno. > > _______________________________________________ > pytest-dev mailing list > pytest-dev@python.org<mailto:pytest-dev@python.org> > https://mail.python.org/mailman/listinfo/pytest-dev > > > > -- > > Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, > > Commercial register: Amtsgericht Muenchen, HRB 153243, > > Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, > Eric Shander > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 > _______________________________________________ > 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