diff options
author | ankitjavalkar | 2017-03-09 18:13:11 +0530 |
---|---|---|
committer | ankitjavalkar | 2017-03-09 18:19:42 +0530 |
commit | f5fd0c9eae3d673209528db37e5848cb38a568e6 (patch) | |
tree | 46c0521525bdcb2e08c3c5bdbac1a763b73fee5e | |
parent | 69951e247ea02196ec6e65324f77898d9ea389b3 (diff) | |
download | online_test-f5fd0c9eae3d673209528db37e5848cb38a568e6.tar.gz online_test-f5fd0c9eae3d673209528db37e5848cb38a568e6.tar.bz2 online_test-f5fd0c9eae3d673209528db37e5848cb38a568e6.zip |
Add coverage:
- Add coverage prerequisite to requirements
- Add coverage config file
- Add coverage command to travis
-rw-r--r-- | .coveragerc | 12 | ||||
-rw-r--r-- | .travis.yml | 11 | ||||
-rw-r--r-- | requirements/requirements-common.txt | 1 |
3 files changed, 21 insertions, 3 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..4ac9a45 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,12 @@ +[run] +branch = True +source = . +omit = + *tests* + *migrations* + +[report] +exclude_lines = + except ImportError: + raise NotImplementedError + if __name__ == .__main__.:
\ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f1c4dab..4777f11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,12 @@ install: - pip install -r requirements/requirements-common.txt - python setup.py develop -# command to run tests +# command to run tests and coverage script: - - python manage.py test -v 2 yaksh - - python manage.py test -v 2 yaksh.live_server_tests.load_test + - coverage erase + - coverage run -p manage.py test -v 2 yaksh + - coverage run -p manage.py test -v 2 yaksh.live_server_tests.load_test + +after_success: + - coverage combine + - coverage report diff --git a/requirements/requirements-common.txt b/requirements/requirements-common.txt index ad29291..e04c5bd 100644 --- a/requirements/requirements-common.txt +++ b/requirements/requirements-common.txt @@ -4,3 +4,4 @@ pytz==2016.4 python-social-auth==0.2.19 tornado selenium==2.53.6 +coverage |