Fixture parametrization overwrite each other. #4948
Labels
topic: fixtures
anything involving fixtures directly or indirectly
topic: parametrize
related to @pytest.mark.parametrize
I'm trying to parametrize a fixture using pytest_generate_tests(), with one
caveat: parametrization is different for each test function and depends on the
function name. I want a fixture to have a different value for different
test-cases.
When metafunc.parametrize('fixture_name', ...) is called with different
arguments, it somehow overwrites global parametrization for 'fixture_name', not
a per test-function parametrization.
pip list
of the virtual environment you are usingpytest and operating system versions
$ pytest --version
This is pytest version 4.3.1
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
`
Minimal example if possible
results:
The text was updated successfully, but these errors were encountered: