Replies: 3 comments
-
Hey guys, any ideas on how to support this use case? It doesn't have to be via this particular approach discussed above, any other viable option is ok. If there are no other alternatives, should I file an issue request regarding the indirect parameter inconsistency? |
Beta Was this translation helpful? Give feedback.
-
Guys, dev team, does anyone have a suggestion? Isn't this a somewhat regular use case - passing command line parameters to create different version of test objects unless explicitly specified by parametrize annotation? |
Beta Was this translation helpful? Give feedback.
-
I found a solution to this problem. Here are the details deepset-ai/haystack#1202 |
Beta Was this translation helpful? Give feedback.
-
Hey guys,
Let me show you the code right away:
And my test_db.py:
Command-line parameter
--db_type
allows users to invoke tests for either all supported types of dbs or a subset of them. However, some tests are db specific and therefore I want to hardcode the db version with@pytest.mark.parametrize
annotation.This approach works perfectly for test_generic_op and test_specific_op if
indirect=False
. However, because I use fixtures for dbs, I have to useindirect=True
. For test_specific_op, as soon as I switch indirect to True all parametrized variants of the db test are collected instead of justmemory
ie. its hard-coded annotation is ignored.How can I achieve these objectives?
Beta Was this translation helpful? Give feedback.
All reactions