| Conditions | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import os |
||
| 17 | def cov(): |
||
| 18 | """Runs the unit tests with coverage.""" |
||
| 19 | tests = unittest.TestLoader().discover('tests') |
||
| 20 | result = unittest.TextTestRunner(verbosity=2).run(tests) |
||
| 21 | if result.wasSuccessful(): |
||
| 22 | COV.stop() |
||
| 23 | COV.save() |
||
| 24 | print('Coverage Summary:') |
||
| 25 | COV.report() |
||
| 26 | basedir = os.path.abspath(os.path.dirname(__file__)) |
||
| 27 | covdir = os.path.join(basedir, 'tmp/coverage') |
||
| 28 | COV.html_report(directory=covdir) |
||
| 29 | print('HTML version: file://%s/index.html' % covdir) |
||
| 30 | COV.erase() |
||
| 31 | return 0 |
||
| 32 | return 1 |
||
| 33 | |||
| 37 |