From 1adda03be757b9e41388f8237374b01b8bf97c54 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 10 Dec 2023 18:53:38 -0500 Subject: [PATCH] docs: a little more in the quick start about what will be measured. #1707 --- doc/index.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index 9e73099a1..169f61f98 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -111,9 +111,14 @@ Getting started is easy: $ coverage run -m nose arg1 arg2 + Coverage doesn't distinguish between tests and the code being tested. + We `recommend that you include your tests in coverage measurement `_. + To limit coverage measurement to code in the current directory, and also find files that weren't executed at all, add the ``--source=.`` argument to - your coverage command line. + your coverage command line. You can also :ref:`specify source files to + measure ` or :ref:`exclude code from measurement `. #. Use ``coverage report`` to report on the results:: @@ -144,6 +149,8 @@ Getting started is easy: .. _report like this: https://nedbatchelder.com/files/sample_coverage_html/index.html .. _report like this one: https://nedbatchelder.com/files/sample_coverage_html_beta/index.html .. _nose state: https://github.com/nose-devs/nose/commit/0f40fa995384afad77e191636c89eb7d5b8870ca +.. _include tests: https://nedbatchelder.com/blog/202008/you_should_include_your_tests_in_coverage.html + Capabilities