Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added code coverage
  • Loading branch information
proost committed Sep 20, 2016
1 parent c015b6b commit 09b4fe7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -19,4 +19,6 @@ uploads/*

*.swp

.coverage

__pycache__/
1 change: 1 addition & 0 deletions requirements.txt
@@ -1,5 +1,6 @@
alembic==0.8.4
blinker==1.4
coverage==4.2
decorator==4.0.6
Flask==0.10.1
Flask-Admin==1.4.0
Expand Down
18 changes: 17 additions & 1 deletion run_unittest.py
@@ -1,8 +1,24 @@
#!/usr/bin/env python3
import unittest
import os

from tests.website import WebsiteTest
from tests.utils import UtilsTest

from coverage import coverage

cov = coverage(branch=True, omit=['virtualenv/*', 'tests.py'])
cov.start()

if __name__ == '__main__':
unittest.main(failfast=True)
try:
unittest.main(failfast=True)
except:
pass

cov.stop()
cov.save()
print("\n\nCoverage Report:\n")
cov.report()
cov.html_report(directory='tmp/coverage')
cov.erase()

0 comments on commit 09b4fe7

Please sign in to comment.