Skip to content

Commit 6f5cecc

Browse files
committed
Update pytest markers
1 parent 23fdfd8 commit 6f5cecc

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[pytest]
2+
addopts = --strict-markers
3+
markers =
4+
slow: marks tests as slow (deselect with '-m "not slow"')

script/test

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ for i in ${@}; do
2222
default=
2323
;;
2424

25-
ratelimiting)
26-
ratelimiting=true
25+
slow)
26+
slow=true
2727
default=
2828
;;
2929

@@ -47,12 +47,12 @@ fi
4747

4848
# Run the test suite
4949
if [ ${default} ] || [ ${tests} ]; then
50-
echo "==> Running the test suite"
51-
py.test -s -m "not ratelimit"
50+
echo "==> Running the test suite (excluding slow tests)"
51+
py.test -s -m "not slow"
5252
fi
5353

5454
# Run the rate-limit tests
55-
if [ ${ratelimiting} ]; then
56-
echo "==> Running the rate-limit tests"
57-
py.test -s -m "ratelimit"
55+
if [ ${slow} ]; then
56+
echo "==> Running the slow tests"
57+
py.test -s -m "slow"
5858
fi

tests/test_restsession.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def rate_limit_detected(w):
4444

4545

4646
# Tests
47-
@pytest.mark.ratelimit
47+
@pytest.mark.slow
4848
def test_rate_limit_retry(api, list_of_rooms, add_rooms):
4949
# Save state and initialize test setup
5050
original_wait_on_rate_limit = api._session.wait_on_rate_limit

0 commit comments

Comments
 (0)