We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd14857 commit 2f2f790Copy full SHA for 2f2f790
test_app.py
@@ -4,6 +4,15 @@
4
from unittest import mock
5
import tempfile
6
import geoip2.records
7
+import coverage
8
+
9
+cov = coverage.coverage(
10
+ omit = [
11
+ '/Users/shalabh.aggarwal/workspace/cookbook10/lib/python3.6/site-packages/*',
12
+ 'app_tests.py'
13
+ ]
14
+)
15
+cov.start()
16
17
18
class CatalogTestCase(unittest.TestCase):
@@ -147,4 +156,11 @@ def test_search_product(self):
147
156
148
157
149
158
if __name__ == '__main__':
150
- unittest.main()
159
+ try:
160
+ unittest.main()
161
+ finally:
162
+ cov.stop()
163
+ cov.save()
164
+ cov.report()
165
+ cov.html_report(directory = 'coverage')
166
+ cov.erase()
0 commit comments