Allow marking and running of just unit or just integration tests
authorKarl O. Pinc <kop@karlpinc.com>
Sun, 5 Jan 2020 08:09:08 +0000 (02:09 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Sun, 5 Jan 2020 08:38:18 +0000 (02:38 -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 a8e4a6682ae175fad05f0be5c5c2790436445aa8..809a13005e301e3e65cf19819a0bad0834a094f6 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -28,3 +28,8 @@ commands =
 exclude = .tox,*.egg,build,data,devel
 select = E,W,F
 ignore = W503
+
+[pytest]
+markers =
+  unittest
+  integrationtest