Skip to content

Commit

Permalink
Setup code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacques Joubert committed Feb 14, 2019
1 parent c751f23 commit 0daed7f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ git:
script:
- python -m unittest discover
- pylint mlfinlab --rcfile=.pylintrc -f text
- bash coverage
- bash ./scripts/coverage
File renamed without changes.
27 changes: 0 additions & 27 deletions scripts/c2

This file was deleted.

6 changes: 3 additions & 3 deletions coverage → scripts/coverage
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

# Note: To run specific modules for code coverage, run this command, e.g.:
# coverage run -m unittest mlfinlab.tests.unit.test_mod1 mlfinlab.tests.unit.test_mod2
echo "----Running Code Coverage----"

# Remove multiprocessing coverage files in case a previous combine wasn't performed
rm .coverage.*
rm -fR cover/
# Remove the main coverage file (.coverage)
coverage erase

# Discover and run all tests
coverage run --concurrency=multiprocessing ./scripts/run_tests.py discover -v

Expand All @@ -25,4 +25,4 @@ if [ $coverage_report -ne 0 ]
then
echo -e "Travis Build FAILURE: Coverage percentage failed"
exit 1
fi
fi

0 comments on commit 0daed7f

Please sign in to comment.