diff --git a/examples/README.rst b/examples/README.rst index a232f2a0..0f5306da 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -9,7 +9,10 @@ These examples provide necessary configuration to: The `adhoc` layout is the old and problematic layout where you can mix up the installed code with the source code. However, these examples will provide correct configuration even for -the `adhoc` layout. +the `adhoc` layout. Its coverage configuration uses ``source_pkgs = example`` to measure +the installed package without also measuring unrelated files in the test directory. +The ``changedir = tests`` setting is still needed to keep the source checkout out of +Python's import path, so tests exercise the installed package. The `src` layout configuration is less complicated, have that in mind when picking a layout for your project. diff --git a/examples/adhoc-layout/.coveragerc b/examples/adhoc-layout/.coveragerc index 2d87ca04..4cdd3b07 100644 --- a/examples/adhoc-layout/.coveragerc +++ b/examples/adhoc-layout/.coveragerc @@ -5,9 +5,7 @@ source = [run] branch = true -source = - example - . +source_pkgs = example [report] precision = 2