[ x] a detailed description of the bug or suggestion
[ x] output of pip list from the virtual environment you are using
[ x] pytest and operating system versions
[ x] minimal example if possible
When setting up test parameterisation using a combination of pytest_generate_test hooks and fixture decorators, along with pytest.mark.parameterize decorators I'm seeing inconsistent behaviour with the fixtures which have scope='class'. In the application context these fixtures load large tables of data which takes quite a long time.
When an immutable object is passed as the fixture parameter - the fixtures behave as expected, however when mutable object, like a list is passed, the class fixture gets called repeatedly. The workaround identified in #896 did not seem to make a difference so I have opened a new issue.
If this is expected behaviour or a known bug I would like to add a warning to the docs to make this clear.
pip list
from the virtual environment you are usingWhen setting up test parameterisation using a combination of
pytest_generate_test
hooks and fixture decorators, along withpytest.mark.parameterize
decorators I'm seeing inconsistent behaviour with the fixtures which havescope='class'
. In the application context these fixtures load large tables of data which takes quite a long time.When an immutable object is passed as the fixture parameter - the fixtures behave as expected, however when mutable object, like a list is passed, the class fixture gets called repeatedly. The workaround identified in #896 did not seem to make a difference so I have opened a new issue.
If this is expected behaviour or a known bug I would like to add a warning to the docs to make this clear.
Possibly Related
3678, #896
LSB Release
PIP Freeze >>
Minimum Reproducible Example
Output of Test