This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
forked from fairview/django-site-broadcasts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TEST-28] - Setup tox + pytest in broadcasts and increased version to…
… 0.9
- Loading branch information
1 parent
ec9e684
commit 17eb803
Showing
7 changed files
with
149 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,9 @@ media/css/*.r*.css | |
*.egg-info | ||
build/ | ||
dist/ | ||
.tox/ | ||
.cache/ | ||
.coverage | ||
coverage.xml | ||
htmlcov/ | ||
junit*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from django.conf import settings | ||
|
||
|
||
def pytest_configure(): | ||
settings.configure( | ||
DEBUG=True, | ||
LANGUAGE_CODE='en-us', | ||
USE_TZ=True, | ||
DATABASES={ | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': 'dev.db', | ||
} | ||
}, | ||
ROOT_URLCONF='broadcasts.urls', | ||
INSTALLED_APPS=[ | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sites', | ||
'broadcasts', | ||
], | ||
SITE_ID=1, | ||
TEMPLATES=[{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'APP_DIRS': True, | ||
'OPTIONS': { | ||
'context_processors': [ | ||
"django.contrib.auth.context_processors.auth", | ||
"django.template.context_processors.debug", | ||
"django.template.context_processors.i18n", | ||
"django.template.context_processors.media", | ||
"django.template.context_processors.static", | ||
"django.template.context_processors.tz", | ||
"django.template.context_processors.request", | ||
"django.contrib.messages.context_processors.messages", | ||
], | ||
}, | ||
}, ] | ||
) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[tox] | ||
skip_missing_interpreters = True | ||
envlist = | ||
py27-lint | ||
py{27}-django{19} | ||
|
||
[testenv] | ||
install_command = pip install --extra-index-url https://pypi.nationalgeographic.org/simple/ {opts} {packages} | ||
commands = pytest --cov=broadcasts \ | ||
--cov-report term-missing \ | ||
--cov-report html \ | ||
--cov-report xml \ | ||
--junitxml=junit-{envname}.xml | ||
|
||
deps = | ||
-rrequirements.txt | ||
pytest | ||
pytest-cov | ||
pytest-django | ||
django19: Django<1.10 | ||
django110: Django<1.11 | ||
django111: Django<2.0 | ||
setenv = | ||
PYTHONPATH={toxinidir}:{toxinidir}/example | ||
|
||
[testenv:py27-lint] | ||
deps= | ||
flake8 | ||
|
||
commands= | ||
flake8 . | ||
|
||
[pytest] | ||
python_files = tests.py **/tests.py **/tests/*.py | ||
|
||
[coverage:run] | ||
omit = | ||
*/tests.py | ||
*/migrations/* | ||
*/settings.py | ||
broadcasts/__init__.py | ||
|
||
[flake8] | ||
exclude = | ||
.git | ||
__pycache__ | ||
doc_src | ||
build | ||
dist | ||
.tox | ||
example | ||
tests | ||
tests*.py | ||
ignore = E124,E127,E128,E305,W601,E501 | ||
max-line-length = 119 |