From 307a1049bdf5447f9b777a39d45113a51e5ff927 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sun, 5 Jan 2020 02:09:07 -0600 Subject: [PATCH] Allow marking and running of just unit or just integration tests --- Makefile_pgwui.mk | 17 ++++++++++++++++- tox.ini | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) 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 6ca5e4d..8510da9 100644 --- a/tox.ini +++ b/tox.ini @@ -29,3 +29,8 @@ commands = exclude = .tox,*.egg,build,data,devel select = E,W,F ignore = W503 + +[pytest] +markers = + unittest + integrationtest -- 2.34.1