Skip to content

Commit

Permalink
Port to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Oct 27, 2018
1 parent 6fe5a04 commit 036c136
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ clean:
@find . -name "__pycache__" -type d | xargs rm -rf

test: clean
@python runtests.py --with-coverage
@pytest --cov=cattp
13 changes: 13 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from django.conf import settings
settings.configure(
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}},
TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
}],
AES_ENCRIPTION_KEY='abcdefgh01234567',
INSTALLED_APPS=[
'django.contrib.contenttypes',
'django.contrib.auth',
],
)
10 changes: 7 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
-r requirements.txt

coverage==4.3.4
django-nose==1.4.5
mock==2.0.0
codecov==2.0.9
coverage>=4.4
flake8==3.4.1
mock==2.0.0
pytest>=3.9.1
pytest-cov>=2.6.0
pytest-django>=3.4.3
Empty file added tests/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions tests/test_dumb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_dumb():
assert 1 == 1

0 comments on commit 036c136

Please sign in to comment.