From a59af71a77d928536412ea71b20689dfc99dd033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 7 Aug 2023 13:45:31 +0200 Subject: Add tests. --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 753fe28..09a500c 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,21 @@ -.PHONY: tags check documentation sphinx-apidoc +.PHONY: tags check documentation sphinx-apidoc test DOC_OUTPUT = doc.rendered +PYTEST_FLAGS = $(if $(shell python -m pytest -VV | grep pytest-cov), \ + --cov=mu4web --cov-branch --cov-report=html --full-trace) + tags: - ctags `find mu4web -type f -name \*.py ` + ctags `find mu4web -type f -name '*.py'` + +run: + python -m mu4web check: mypy -p mu4web flake8 mu4web + flake8 test + mypy test sphinx-apidoc: sphinx-apidoc --separate --force -o doc mu4web @@ -16,3 +24,6 @@ $(DOC_OUTPUT)/index.html: sphinx-apidoc sphinx-build -b dirhtml doc $(DOC_OUTPUT) documentation: $(DOC_OUTPUT)/index.html + +test: + python -m pytest $(PYTEST_FLAGS) test -- cgit v1.2.3