Allow marking and running of just unit or just integration tests
authorKarl O. Pinc <kop@karlpinc.com>
Sun, 5 Jan 2020 08:09:07 +0000 (02:09 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Sun, 5 Jan 2020 08:36:41 +0000 (02:36 -0600)
Makefile_pgwui.mk
tox.ini

index 6e78bcd3d9197737e7ef45e093779c310463bb12..fd0b3e5b47b376cfb9d9c67d2bd5bf0ff47f05f5 100644 (file)
@@ -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 45f17b30237b800078527fb0ba624b5999afa4be..6d5a9904f691a1317b2bfab2551a2ff111bdbed3 100644 (file)
--- 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