Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tobias Lorenz
committed
Jan 14, 2016
1 parent
235d623
commit a908614
Showing
25 changed files
with
380 additions
and
729 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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
*.egg-info/ | ||
*.eggs/ | ||
*.pyc | ||
/media/ | ||
*coverage/ | ||
db.sqlite | ||
build/ | ||
dist/ | ||
docs/build/ | ||
user_media/tests/coverage/ | ||
.coverage | ||
*media/ | ||
*.tox/ |
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 |
---|---|---|
@@ -1,6 +1,31 @@ | ||
language: python | ||
|
||
python: | ||
- "2.6" | ||
- "2.7" | ||
install: pip install -r requirements.txt --use-mirrors | ||
script: python user_media/tests/runtests.py | ||
- "2.7" | ||
- "3.4" | ||
|
||
env: | ||
- DJANGO=django==1.4.* | ||
- DJANGO=django==1.5.* | ||
- DJANGO=django==1.6.* | ||
- DJANGO=django==1.7.* | ||
- DJANGO=django==1.8.* | ||
|
||
install: | ||
- pip install -r test_requirements.txt --use-mirrors | ||
- pip install $DJANGO | ||
- pip install coveralls | ||
|
||
script: | ||
- cd VAR_PACKAGE_NAME/tests | ||
- ./runtests.py | ||
- mv .coverage ../../ | ||
- cd ../../ | ||
|
||
matrix: | ||
exclude: | ||
- python: "3.4" | ||
env: DJANGO=django==1.4.* | ||
|
||
after_success: | ||
- coveralls |
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
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,26 @@ | ||
# !/usr/bin/env python | ||
""" | ||
This script is used to run tests, create a coverage report and output the | ||
statistics at the end of the tox run. | ||
To run this script just execute ``tox`` | ||
""" | ||
import re | ||
|
||
from fabric.api import abort, local | ||
from fabric.colors import green, red | ||
|
||
|
||
if __name__ == '__main__': | ||
local('flake8 --ignore=E126 --ignore=W391 --statistics' | ||
' --exclude=submodules,south_migrations,migrations,build .') | ||
local('coverage run --source="user_media" manage.py test -v 2' | ||
' --traceback --failfast --settings=user_media.tests.settings' | ||
' --pattern="*_tests.py"') | ||
local('coverage html -d coverage' | ||
' --omit="*__init__*,*/settings/*,*/migrations/*,' | ||
'*/south_migrations/*,*/tests/*,*admin*,*compat*"') | ||
total_line = local('grep -n pc_cov coverage/index.html', capture=True) | ||
percentage = float(re.findall(r'(\d+)%', total_line)[-1]) | ||
if percentage < 100: | ||
abort(red('Coverage is {0}%'.format(percentage))) | ||
print(green('Coverage is {0}%'.format(percentage))) |
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,11 @@ | ||
coverage<4.0.0 | ||
django-coverage | ||
fabric | ||
easy_thumbnails | ||
flake8 | ||
ipdb | ||
mixer | ||
mock | ||
tox | ||
django-compat | ||
six |
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,9 @@ | ||
[tox] | ||
envlist = py27-django{17} | ||
|
||
[testenv] | ||
usedevelop = True | ||
deps = | ||
django17: Django>=1.7,<1.8 | ||
-rtest_requirements.txt | ||
commands = python runtests.py |
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
Oops, something went wrong.