build(test): utilise pytest
Parent
7e98cb9cf6
révision
2ab899ee1c
|
@ -14,5 +14,7 @@ uploads/*
|
|||
TAGS
|
||||
tmp/*
|
||||
build/*
|
||||
.coverage
|
||||
htmlcov
|
||||
.ropeproject
|
||||
backups
|
||||
|
|
5
Makefile
5
Makefile
|
@ -17,10 +17,9 @@ help: ## affiche cette aide
|
|||
# dev
|
||||
serve:
|
||||
$(PYTHON) manage.py runserver $(DJANGO_LISTEN)
|
||||
test: ### lance les tests de l'application via pytest
|
||||
$(PYTHON) -m pytest -m 'not slow' --cov=gaby --cov-report=html --cov-report=term-missing gaby
|
||||
|
||||
test:
|
||||
@echo "coverage test"
|
||||
$(PYTHON) -Wd manage.py test $(TEST_SUITE)
|
||||
|
||||
lint: ### vérifie la syntaxe et le code python
|
||||
which black > /dev/null && black --check gaby ; true
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[pytest]
|
||||
DJANGO_SETTINGS_MODULE = gaby.settings.test
|
||||
python_files = tests.py test_*.py *_tests.py
|
||||
filterwarnings =
|
||||
ignore::django.utils.deprecation.RemovedInDjango30Warning
|
||||
markers =
|
||||
wip: mark a test work in progress, to help designing a test
|
||||
slow: mark a test 'slow'
|
Chargement…
Référencer dans un nouveau ticket