I would like to know if it is possible to set the value of the list of params to fixture when parameterizing the fixture.
All fixtures to put in the list here
def fixture1 (fixture1', fixture2', ...): -------- processing -------- return value
It is a fixture that becomes
The ideal is as follows.
@ pytest.fixture (params = [fixure1, fixture2,<-** I want to put a fixture here !!!! **]) def function (request): return request.param
I know I can do it by putting the values in the list normally, but here I want to put the return value of the fixture in the list of params.
- When [fixture1, fixture2, ...]
→ It is processed by a function instead of a fixture.
'function' object has no attribute'property'
Corresponding source code
2. When fixture1 (argument 1, argument 2, ...)
(Note) All arguments are fixture
->I get an error in the argument fixture
Argument 1 is not defined
What I tried
The source code is from the company and cannot be shown. .. .. .. I'm sorry. All fixtures with arguments 1, 2, ... are in conftest I would like to describe the fixture and fixture1, fixture2, ... that I want to implement in the test_ ~~~ .py file.
I moved the description of conftest to the test_ ~~~ .py file, and tried to write it in @ pytest.mark.parametrize () instead of params = , but all of them give similar errors. ..
I thought it would be impossible to put the fixture in the value, so I searched, but I couldn't find any article that put the fixture directly in the list value.Supplementary information (FW/tool version, etc.)
If i have time, thank you.
Answer # 1
Was self resolved.
- is it possible to connect to mysql of xampp started from another pc via wifi with a python application?
- ruby - is it possible to apply column values in model validation (character limit)?
- python - the values of other arrays change with the array
- python - how to use subscripts to represent the values of another list in a list
- is it possible to operate the browser control of python that has already been opened?
- python - pandas replacing values after a few seconds
- python - when converting from webm to mp4, the conversion is possible but combined
- python - whether scraping is possible
- [python] [tkinter] i want to get multiple checkbox values
- python - i want to retrieve only even values in the list using an if statement
- python - how to list only specific values in a dictionary
- is it possible to replace uwsc with python altogether?
- is it possible to determine if today is the first weekday of the week starting on monday? : python
- c # - is it possible to set multiple values for one variable?
- python 3x - valueerror: not enough values to unpack (expected 3, got 2)
- python 3x - i want to get a matrix with the values of a certain column removed for each row of the matrix with pytorch (speedu
- python - read and write values from another file
- python - i want to remove whitespace in dictionary values
- python - i want to display the maximum and minimum values from the n real numbers i entered
- python : How to display media files loaded through the admin. Panel in Django?
- python : How to display objects associated via ForeignKey in Django pattern?
- python : How to display media files in the Django template?
- Indexerror: List Index Out of Range [Django, Python, Object, Filter]
- python : NOT NULL CONSTRAINT FAILED
- python : The default picture in the Django model
- python : How to write data into a model with an abstract model?
- python : How to withdraw headers on the site?
- python : How to bring articles?
- python : How to make choiseis elements Django dynamic?