From: Karl O. Pinc Date: Sun, 5 Jan 2020 08:09:07 +0000 (-0600) Subject: Allow marking and running of just unit or just integration tests X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=307a1049bdf5447f9b777a39d45113a51e5ff927;p=pgwui_common Allow marking and running of just unit or just integration tests --- 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