Machine Learning Software Engineer - Hobbyst Technical Writer - Interested in Software Testing, Best Practices, Scalability, and Python.
AI Software Engineer based in London, UK with 6+ years of professional experience developing and releasing software in different programming languages - Hobbyist Technical Writer - Interested in Software Testing, Best Practices, Scalability, Machine Learning/AI, and Python.
Markdown supported · ⌘↵ to post
Алексей Каллистов
Hello! And what could you suggest, if I need to use in parametrization a fixture, which returns unpredictable number of values? Of course, we could use it in parametrization as a regular Python function, but what if it's impossible? For example, this question is discussed here, but no solution was found: github.com/pytest-dev/pytest/issues/349
In my case, I definitely need a fixture and not a regular function, because parametrized value depends on HTTP service response.
Here is example code which matches my case: pastebin.com/gLn1CrAa
Of course, it doesn't work, because I'm trying to use fixture directly in mark.parametrize. Maybe, there is some suitable solution?