Skip to content

Commit

Permalink
docs: a little more in the quick start about what will be measured. #…
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 10, 2023
1 parent 6a9766e commit 1adda03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <include
tests_>`_.

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

This comment has been minimized.

Copy link
@buhtz

buhtz Dec 11, 2023

Because of #1708 I am not sure if the value . is always the best for --source, e.g. when using "src"-layout.

your coverage command line.
your coverage command line. You can also :ref:`specify source files to
measure <source>` or :ref:`exclude code from measurement <excluding>`.

#. Use ``coverage report`` to report on the results::

Expand Down Expand Up @@ -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
Expand Down

1 comment on commit 1adda03

@buhtz
Copy link

@buhtz buhtz commented on 1adda03 Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds much better and clear to me. Thanks a lot.

Please sign in to comment.