Skip to content

Commit e01b0ac

Browse files
committed
Add pytest markers for slow tests
1 parent a4b762b commit e01b0ac

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pytest.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[pytest]
2+
minversion = 6.0
3+
markers =
4+
slow: mark test as too slow to run in every CI run
5+
6+
testpaths =
7+
tests
8+

tests/test_examples.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import subprocess
44
from unittest import skipIf
55

6+
import pytest
67
from flaky import flaky
78

89

910
def slow_test(func):
11+
pytest.mark.slow(func)
1012
func.speed = "slow"
1113
slow_test_env = (
1214
os.environ["SKIP_SLOW_TESTS"].lower()

0 commit comments

Comments
 (0)