From cf11e85f9af6dc1313fad35b9a9446c0a9b541c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Tue, 17 Feb 2015 21:21:52 +0100 Subject: [PATCH] Added coverage and flake8 configuration to setup.cfg. Cleaned up these tools. --- .coveragerc | 4 ---- .gitignore | 1 - .travis.yml | 6 +++--- requirements.txt | 2 +- setup.cfg | 15 ++++++++++++--- 5 files changed, 16 insertions(+), 12 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 8655e4714..000000000 --- a/.coveragerc +++ /dev/null @@ -1,4 +0,0 @@ -[run] -source=openslides -[report] -exclude_lines = def __(unicode|repr)__ diff --git a/.gitignore b/.gitignore index a1dbe723a..ddf502c38 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,3 @@ dist/* # Unit test and coverage reports .coverage -htmlcov/* diff --git a/.travis.yml b/.travis.yml index 86c9cbab0..142b08c05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/requirements.txt b/requirements.txt index a776e612a..4ac762f66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.cfg b/setup.cfg index 686d1fbb9..245f0c1f7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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