Skip to content

Commit

Permalink
Skip oedbtest in pytest unless --runoedbtest option is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
joda9 committed Jul 9, 2024
1 parent 7c4cbbb commit 47abe91
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,8 @@ def pytest_collection_modifyitems(config, items):
for item in items:
if "runonlinux" in item.keywords:
item.add_marker(skip_windows)
if config.getoption("--runoedbtest"):
# If the --runoedbtest option is specified, do not skip any tests
return
skip_oedbtest = pytest.mark.skip(reason="Need --runoedbtest option to run")
for item in items:
if "oedbtest" in item.keywords:
item.add_marker(skip_oedbtest)
if not config.getoption("--runoedbtest"):
skip_oedbtest = pytest.mark.skip(reason="need --runoedbtest option to run")
for item in items:
if "oedbtest" in item.keywords:
item.add_marker(skip_oedbtest)

0 comments on commit 47abe91

Please sign in to comment.