[pytest-dev] Parametrizing dependent fixtures

Geiger, Davin davin.geiger at intel.com
Mon Jan 8 08:41:44 EST 2018


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.com at python.org] On Behalf Of Ronny Pfannschmidt
Sent: Monday, January 8, 2018 14:36
To: Bruno Oliveira <nicoddemus at gmail.com>
Cc: Edgar Ostrowski <edgar.ostrowski at gmail.com>; pytest-dev <pytest-dev at 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 <nicoddemus at gmail.com<mailto:nicoddemus at gmail.com>>:
Hi Edgar,

On Mon, Jan 8, 2018 at 10:32 AM Edgar Ostrowski <edgar.ostrowski at gmail.com<mailto:edgar.ostrowski at 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 at python.org<mailto:pytest-dev at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20180108/c33c3f93/attachment.html>


More information about the pytest-dev mailing list