Skip to content

Commit 8d3033d

Browse files
committed
Update test requirements and add coverage to tox
1 parent 1132410 commit 8d3033d

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

setup.cfg

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ maintainer =
4444
dev =
4545
flake8>=3.7,<4
4646
tox>=3,<4
47-
pytest>=3.2.5,<4
48-
pytest-cov
49-
pytest-asyncio; python_version>="3.4"
5047
Sphinx>=1.8,<2
51-
coverage>=5.0,<6
5248
test =
53-
pytest>=3.2.5,<4
49+
pytest>=4,<5; python_version<"3"
50+
pytest>5; python_version>="3"
51+
pytest-cov
52+
pytest-asyncio; python_version>="3.4"
5453
graphene>=2.0,<3
5554
gevent
5655
graphene>=2.0

tox.ini

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[tox]
2-
envlist = py27, py35, py36, py37, py38, flake8
2+
envlist =
3+
coverage_setup
4+
py27, py35, py36, py37, py38, flake8
5+
coverage_report
36

47
[travis]
58
python =
@@ -11,9 +14,22 @@ python =
1114

1215
[testenv]
1316
extras = test
14-
commands = pytest
17+
commands = pytest --cov --cov-append --cov-report=
1518

1619
[testenv:flake8]
1720
skip_install = true
1821
deps = flake8
1922
commands = flake8 graphql_ws
23+
24+
[testenv:coverage_setup]
25+
skip_install = true
26+
deps = coverage
27+
commands = coverage erase
28+
29+
[testenv:coverage_report]
30+
skip_install = true
31+
deps = coverage
32+
commands =
33+
coverage html
34+
coverage report --include="tests/*" --fail-under=100 -m
35+
#coverage report --omit="tests/*" --fail-under=90 -m

0 commit comments

Comments
 (0)