From 7c58316ade33cbe48be00045d7f79a4d7b83379f Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Fri, 8 May 2020 10:29:56 -0400
Subject: [PATCH] Succeed in excluding the Versioneer source file

Also document some of the other decisions in the .coveragerc file
---
 .coveragerc | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/.coveragerc b/.coveragerc
index dff5eae..4d27672 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -3,23 +3,33 @@ source =
     _zkapauthorizer
     twisted.plugins.zkapauthorizer
 
+# Measuring branch coverage is slower (so the conventional wisdom goes) but
+# too bad: it's an important part of the coverage information.
 branch = True
+
+# Whether or not we actually collect coverage information in parallel, we need
+# to have the coverage data files written according to the "parallel" naming
+# scheme so that we can use "coverage combine" later to rewrite paths in the
+# coverage report.
 parallel = True
 
 omit =
-    # The Versioneer version file in the repository is generated by
-    # Versioneer.  Let's call it Versioneer's responsibility to ensure it
-    # works and not pay attention to our test suite's coverage of it.  Also,
-    # the way Versioneer works is that the source file in the repository is
-    # different from the source file in an installation - which is where we
-    # measure coverage.  When the source files differ like this, it's very
-    # difficult to produce a coherent coverage report (measurements against
-    # one source file are meaningless when looking at a different source
-    # file).
-    src/_zkapauthorizer/_version.py
+# The Versioneer version file in the repository is generated by
+# Versioneer.  Let's call it Versioneer's responsibility to ensure it
+# works and not pay attention to our test suite's coverage of it.  Also,
+# the way Versioneer works is that the source file in the repository is
+# different from the source file in an installation - which is where we
+# measure coverage.  When the source files differ like this, it's very
+# difficult to produce a coherent coverage report (measurements against
+# one source file are meaningless when looking at a different source
+# file).
+    */_zkapauthorizer/_version.py
 
 [paths]
 source =
+# It looks like this in the checkout
     src/
+# It looks like this in the Nix build environment
     /nix/store/*/lib/python*/site-packages/
+# It looks like this in the Windows build environment
     C:\hostedtoolcache\windows\Python\2.7.18\x64\Lib\site-packages\
-- 
GitLab