From 9ea14b2768e28618973cbc709706cb22e0fe7ae1 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sun, 5 Jan 2020 02:09:08 -0600 Subject: [PATCH] Allow marking and running of just unit or just integration tests --- Makefile_pgwui.mk | 17 ++++++++++++++++- tox.ini | 7 ++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile_pgwui.mk b/Makefile_pgwui.mk index 6e78bcd..fd0b3e5 100644 --- a/Makefile_pgwui.mk +++ b/Makefile_pgwui.mk @@ -117,13 +117,28 @@ upload: .PHONY: push git push -## check Quick run of regression tests, +## check Quick run of all regression tests, ## only with the default python .PHONY: check check: devel/pytest devel/pytest/bin/flake8 . devel/pytest/bin/py.test --cov=pgwui_${PGWUI_NAME} tests +## check-unit Quick run of unit regression tests, +## only with the default python +.PHONY: check-unit +check-unit: devel/pytest + devel/pytest/bin/flake8 . + devel/pytest/bin/py.test -m unittest --cov=pgwui_${PGWUI_NAME} tests + +## check-integration Quick run of integration regression tests, +## only with the default python +.PHONY: check-integration +check-integration: devel/pytest + devel/pytest/bin/flake8 . + devel/pytest/bin/py.test -m integrationtest \ + --cov=pgwui_${PGWUI_NAME} tests + ## pudb Run the python pudb debugger .PHONY: pudb pudb: devel/pudb diff --git a/tox.ini b/tox.ini index 95ebaab..bf12469 100644 --- a/tox.ini +++ b/tox.ini @@ -22,10 +22,15 @@ commands = twine check dist/* flake8 . py.test --cov=pgwui_upload tests/ - # coverage run --source src/upload -m py.test + # coverage run --source src/pgwui_upload -m py.test # coverage report [flake8] exclude = .tox,*.egg,build,data,devel select = E,W,F ignore = W503 + +[pytest] +markers = + unittest + integrationtest -- 2.34.1