<div dir="ltr"><div><div><div>My projects tend to have a .coveragerc file like this:<br><br>[run]<br>branch = True<br>source =<br>    exponent<br>    docs/tutorial/todo<br><br>[report]<br>exclude_lines =<br>    pragma: no cover<br>

<br></div>Alternatively, all of those can be specified on the command line. You probably want the --source argument to coverage run. You can get help for coverage run by typing &quot;coverage help run&quot;. Also take a look at the --include/--omit flags :)<br>

<br>For a runnable example, look at: <a href="https://github.com/lvh/exponent">https://github.com/lvh/exponent</a><br><br></div>Specifically, .coveragerc and tox.ini.<br><br></div>hth<br>lvh<br><br></div>