Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit 491eb1d

Browse files
committed
Show warnings from tests with once:: filter
1 parent 153d141 commit 491eb1d

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

.github/workflows/drawdown.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install -r requirements.txt
22-
- name: Test with pytest
21+
- name: Test with tox
2322
run: |
24-
pip install pytest
25-
pytest -v --cov=. --cov-report term --cov-report=xml --strict-markers
23+
pip install tox==3.14.0
24+
tox -e ci
2625
- name: Export to codecov.io
2726
uses: codecov/[email protected]
2827
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ __pycache__
1010
.ipynb_checkpoints
1111

1212
.tox
13+
.vscode

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
default: test
22

33
test:
4-
pytest -v -m "not slow" --strict-markers -W ignore::DeprecationWarning
4+
tox
55

66
alltest:
7-
pytest -v --cov=. --cov-report term-missing --strict-markers -W ignore::DeprecationWarning
7+
tox -e all
88

99
alltests: alltest
1010

pytest.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

tox.ini

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
[tox]
2-
envlist=py38
3-
skipsdist=True
2+
envlist = py38
3+
skipsdist = True
44

55
[testenv]
66
# one virtual env for all test - without this line tox will install .tox/all env to run the 'all' suit
7-
envdir = {toxinidir}/.tox
7+
envdir = {toxworkdir}/common
88

99
deps =
1010
-rrequirements.txt
1111

1212
commands =
13-
pytest -v -m "not slow" --strict-markers -W ignore::DeprecationWarning {posargs}
13+
pytest -m "not slow" {posargs}
1414

15-
[testenv:verbose]
15+
[testenv:all]
1616
commands =
17-
pytest -sxv {posargs}
17+
pytest --cov=. --cov-report term-missing {posargs}
1818

19-
[testenv:all]
19+
# runs on github workflow
20+
[testenv:ci]
2021
commands =
21-
pytest -v --strict-markers -W ignore::DeprecationWarning --cov=. --cov-report term-missing {posargs}
22+
pytest --cov=. --cov-report term --cov-report=xml
23+
24+
[pytest]
25+
addopts = -v -W once::DeprecationWarning --strict-markers
26+
ignore = .tox .git data
27+
markers =
28+
slow: mark a test as taking a long time.

0 commit comments

Comments
 (0)