-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move commandline args to global conftest * correct test exclude paths * Update Documentation & Code Style * exclude test_generator_pipeline_with_translator from windows ci * exclude further oom tests * enable log_cli Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
40328a5
commit 1bdd1f4
Showing
6 changed files
with
28 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def pytest_addoption(parser): | ||
parser.addoption("--document_store_type", action="store", default="elasticsearch, faiss, memory, milvus, weaviate") | ||
|
||
|
||
def pytest_generate_tests(metafunc): | ||
# Get selected docstores from CLI arg | ||
document_store_type = metafunc.config.option.document_store_type | ||
selected_doc_stores = [item.strip() for item in document_store_type.split(",")] | ||
|
||
# parametrize document_store fixture if it's in the test function argument list | ||
# but does not have an explicit parametrize annotation e.g | ||
# @pytest.mark.parametrize("document_store", ["memory"], indirect=False) | ||
found_mark_parametrize_document_store = False | ||
for marker in metafunc.definition.iter_markers("parametrize"): | ||
if "document_store" in marker.args[0]: | ||
found_mark_parametrize_document_store = True | ||
break | ||
# for all others that don't have explicit parametrization, we add the ones from the CLI arg | ||
if "document_store" in metafunc.fixturenames and not found_mark_parametrize_document_store: | ||
metafunc.parametrize("document_store", selected_doc_stores, indirect=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters