Use pytest for test runner

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
This commit is contained in:
Aleksi Häkli 2019-02-20 23:01:07 +02:00
parent 11e02c8dfc
commit c17db16253
No known key found for this signature in database
GPG key ID: 3E7146964D726BBE
6 changed files with 8 additions and 3 deletions

View file

@ -32,7 +32,7 @@ PASSWORD_HASHERS = [
'django.contrib.auth.hashers.MD5PasswordHasher',
]
ROOT_URLCONF = 'axes.test_urls'
ROOT_URLCONF = 'axes.tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',

View file

@ -4,7 +4,7 @@ import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'axes.test_settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'axes.tests.settings')
from django.core.management import execute_from_command_line

3
pytest.ini Normal file
View file

@ -0,0 +1,3 @@
[pytest]
DJANGO_SETTINGS_MODULE = axes.tests.settings
python_files = tests.py test_*.py tests_*.py *_tests.py *_test.py

View file

@ -2,5 +2,7 @@
coverage==4.5.2
mypy==0.670
prospector==1.1.6.2
pytest==4.3.0
pytest-django==3.4.7
sphinx_rtd_theme==0.4.3
tox==3.7.0

View file

@ -27,7 +27,7 @@ usedevelop = True
ignore_outcome =
djangomaster: True
commands =
coverage run -a manage.py test -v2
coverage run -a -m pytest
coverage report
prospector
mypy axes