Skip to content

Commit a238ab1

Browse files
author
Cecylia Borek
committed
separate tox/makefile targets for different test types
1 parent b705b0b commit a238ab1

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,22 @@ docs:
3434
.PHONY: test
3535
test:
3636
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
37-
@tox -e py37,py39
37+
@tox
38+
39+
.PHONY: test-unit
40+
test:
41+
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
42+
@tox -e unit
43+
44+
.PHONY: test-integration
45+
test:
46+
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
47+
@tox -e integration
48+
49+
.PHONY: test-system
50+
test:
51+
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
52+
@tox -e system
3853

3954
.PHONY: test_specific
4055
test_specific:

tox.ini

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = clean,docs,py37,py39,313
2+
envlist = clean,docs,py{37,39,313}-{unit,integration,system}
33
skipsdist = {env:TOXBUILD:false}
44

55
[testenv:pep8]
@@ -32,7 +32,10 @@ deps = pytest
3232

3333
distdir = build
3434
commands =
35-
{env:TOXBUILD:python -m pytest --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs}
35+
unit: {env:TOXBUILD:python -m pytest tests/unit/ --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs}
36+
integration: {env:TOXBUILD:python -m pytest tests/integration/ --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs}
37+
system: {env:TOXBUILD:python -m pytest tests/system/ --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs}
38+
all: {env:TOXBUILD:python -m pytest tests/ --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs}
3639

3740
[testenv:clean]
3841
deps = coverage

0 commit comments

Comments
 (0)