Added coverage and flake8 configuration to setup.cfg. Cleaned up these tools.

This commit is contained in:
Norman Jäckel 2015-02-17 21:21:52 +01:00
parent 35d522d452
commit cf11e85f9a
5 changed files with 16 additions and 12 deletions

View File

@ -1,4 +0,0 @@
[run]
source=openslides
[report]
exclude_lines = def __(unicode|repr)__

1
.gitignore vendored
View File

@ -25,4 +25,3 @@ dist/*
# Unit test and coverage reports
.coverage
htmlcov/*

View File

@ -14,13 +14,13 @@ install:
- "node_modules/.bin/bower install"
- "node_modules/.bin/gulp --production"
script:
- "flake8 --max-line-length=150 --statistics openslides tests"
- "flake8 openslides tests"
- "isort --check-only --recursive openslides tests"
- "DJANGO_SETTINGS_MODULE='tests.settings' coverage run ./manage.py test tests.unit"
- "coverage report --show-missing --fail-under=35"
- "coverage report --fail-under=43"
- "DJANGO_SETTINGS_MODULE='tests.settings' coverage run ./manage.py test tests.integration"
- "coverage report --show-missing --fail-under=45"
- "coverage report --fail-under=50"
- "DJANGO_SETTINGS_MODULE='tests.old.settings' ./manage.py test tests.old"

View File

@ -2,7 +2,7 @@
-r requirements_production.txt
# Requirements for development and tests in alphabetical order
coverage
coverage>=4.0a5,<4.1.0
flake8
isort

View File

@ -1,4 +1,13 @@
[coverage:run]
source = openslides
[coverage:html]
directory = development/tmp/htmlcov
[flake8]
max_line_length = 150
[isort]
multi_line_output=3
include_trailing_comma=True
skip=main.py,signals.py,csv_import.py,global_settings.py,test_personal_info.py,tests.py,auth.py,search_indexes.py,test_list_of_speakers.py,chatbox.py,test_main_menu.py,test_config.py,runserver.py,rest_api.py,settings.py,test_pdf.py,__main__.py,test_serializers.py,autoupdate.py,pdf.py,widgets.py,models.py,test_csv_import.py,plugins.py,serializers.py,test_csv.py,test_overlays.py,backupdb.py,views.py,test_views.py,urls.py,forms.py,utils.py,test_auth.py
include_trailing_comma = true
multi_line_output = 3
skip = main.py,signals.py,csv_import.py,global_settings.py,test_personal_info.py,tests.py,auth.py,search_indexes.py,test_list_of_speakers.py,chatbox.py,test_main_menu.py,test_config.py,runserver.py,rest_api.py,settings.py,test_pdf.py,__main__.py,test_serializers.py,autoupdate.py,pdf.py,widgets.py,models.py,test_csv_import.py,plugins.py,serializers.py,test_csv.py,test_overlays.py,backupdb.py,views.py,test_views.py,urls.py,forms.py,utils.py,test_auth.py