Skip to content

Commit 5cb5c2e

Browse files
committed
Fix pytest_generate_tests skip during collection
Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
1 parent 8aba462 commit 5cb5c2e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

sdk/python/tests/conftest.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,20 @@ def pytest_generate_tests(metafunc: pytest.Metafunc):
289289
return
290290

291291
if not _integration_test_deps_available:
292-
pytest.skip("Integration test dependencies are not available")
292+
metafunc.parametrize(
293+
"environment",
294+
[
295+
pytest.param(
296+
None,
297+
marks=pytest.mark.skip(
298+
reason="Integration test dependencies are not available"
299+
),
300+
)
301+
],
302+
indirect=True,
303+
ids=["no-integration-deps"],
304+
)
305+
return
293306

294307
own_markers = getattr(metafunc.definition, "own_markers", None)
295308
marker_iter = (

0 commit comments

Comments
 (0)