-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,4 @@ jobs: | |
- name: Test localnet dependent tests | ||
run: | | ||
pytest -m require_localnet multiversx_sdk_cli/tests | ||
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,12 @@ | ||
import pytest | ||
Check failure on line 1 in multiversx_sdk_cli/tests/conftest.py GitHub Actions / runner / mypy
|
||
|
||
|
||
# function executed right after test items collected but before test run | ||
def pytest_collection_modifyitems(config, items): | ||
if not config.getoption('-m'): | ||
skip_me = pytest.mark.skip(reason="to run marked tests, you need to explicitly run them wiht -m") | ||
for item in items: | ||
if "require_localnet" in item.keywords: | ||
item.add_marker(skip_me) | ||
if "skip_on_winodws" in item.keywords: | ||
item.add_marker(skip_me) |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import requests | ||
import time | ||
import pytest | ||
|
||
from pathlib import Path | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[pytest] | ||
markers = | ||
skip_on_windows: marks tests as being skiped when running on windows (deselect with '-m "skip_on_windows"') | ||
skip_on_windows: marks tests as being skipped when running on windows (deselect with '-m "skip_on_windows"') | ||
only: only run a specific test (run using: pytest -m "only") | ||
require_localnet: marks tests that require a localnet (run using: pytest -m require_localnet) | ||
require_localnet: marks tests that require a localnet (select with '-m "require_localnet"') | ||
|
||
log_cli = True |