MCPcopy Index your code
hub / github.com/realpython/discover-flask / cov

Function cov

manage.py:27–43  ·  view source on GitHub ↗

Runs the unit tests with coverage.

()

Source from the content-addressed store, hash-verified

25
26@manager.command
27def cov():
28 """Runs the unit tests with coverage."""
29 cov = coverage.coverage(
30 branch=True,
31 include='project/*'
32 )
33 cov.start()
34 tests = unittest.TestLoader().discover('tests')
35 unittest.TextTestRunner(verbosity=2).run(tests)
36 cov.stop()
37 cov.save()
38 print 'Coverage Summary:'
39 cov.report()
40 basedir = os.path.abspath(os.path.dirname(__file__))
41 covdir = os.path.join(basedir, 'coverage')
42 cov.html_report(directory=covdir)
43 cov.erase()
44
45
46if __name__ == '__main__':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected