Skip to content

Commit

Permalink
Update config files for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed Jun 22, 2018
1 parent 9cb4207 commit c5daea5
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[run]
source = instant
branch = True

[report]
omit =
instant/migrations/*
instant/tests*
instant/test_utils/*
instant/__init__.py

# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = True

[html]
directory = coverage_html_report
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ settings.py
.project
.pydevproject
.settings
coverage_html_report/
test_db

__pycache__/
*.py[cod]
Expand Down
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
language: python

python:
- 2.7
- pypy
- 3.5
- 3.6

env:
- DJANGO=1.11
global:
- PYTHONPATH="/home/travis/build/synw/django-instant"

install:
- pip install -r requirements.txt
- pip install virtualenv tox coveralls

script:
python setup.py test
- tox

after_success:
coveralls
3 changes: 0 additions & 3 deletions instant/tests.py

This file was deleted.

24 changes: 24 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[base]
deps =
cent

[testenv:django11]
deps =
django>=1.10, <2.0
{[base]deps}

[testenv:django2]
deps =
django>=2.0
{[base]deps}

[testenv:coverage]
setenv =
PYTHONPATH = {toxinidir}
commands =
coverage run instant/tests/runtests.py
deps =
coverage
{[testenv:django11]deps}


0 comments on commit c5daea5

Please sign in to comment.