We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6769bd8 + e17ca58 commit 1ca7255Copy full SHA for 1ca7255
.github/workflows/basic.yml
@@ -46,5 +46,5 @@ jobs:
46
ls -l
47
- name: Run tests
48
run: |
49
- pytest torch_np/ -v -s -n 2
+ pytest torch_np/ -v -s -n 2 --runslow
50
torch_np/tests/conftest.py
@@ -0,0 +1,17 @@
1
+import pytest
2
+
3
4
+def pytest_configure(config):
5
+ config.addinivalue_line("markers", "slow: very slow tests")
6
7
8
+def pytest_addoption(parser):
9
+ parser.addoption("--runslow", action="store_true", help="run slow tests")
10
11
12
+def pytest_collection_modifyitems(config, items):
13
+ if not config.getoption("--runslow"):
14
+ skip_slow = pytest.mark.skip(reason="slow test, use --runslow to run")
15
+ for item in items:
16
+ if "slow" in item.keywords:
17
+ item.add_marker(skip_slow)
0 commit comments