From 4425efa048e6cec9b4460820b0f0b15ac88a47f4 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 7 May 2020 21:17:04 -0400
Subject: [PATCH] reshuffle responsibility for different parts of coverage
 handling

---
 .circleci/report-coverage.sh | 3 +--
 zkapauthorizer.nix           | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.circleci/report-coverage.sh b/.circleci/report-coverage.sh
index c10f5d8..a5b86f1 100755
--- a/.circleci/report-coverage.sh
+++ b/.circleci/report-coverage.sh
@@ -1,8 +1,7 @@
 #! /usr/bin/env nix-shell
 #! nix-shell -i bash -p "python.withPackages (ps: [ ps.codecov ])"
 find ./result-doc/share/doc
-cp ./result-doc/share/doc/*/.coverage.* ./
-python -m coverage combine
+cp ./result-doc/share/doc/*/.coverage ./
 python -m coverage report
 python -m coverage xml
 codecov --file coverage.xml
diff --git a/zkapauthorizer.nix b/zkapauthorizer.nix
index 34261bc..d74c8dd 100644
--- a/zkapauthorizer.nix
+++ b/zkapauthorizer.nix
@@ -50,7 +50,7 @@ buildPythonPackage rec {
     runHook preCheck
     "${pyflakes}/bin/pyflakes" src/_zkapauthorizer
     ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} python -m ${if collectCoverage
-      then "coverage run --branch --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module"
+      then "coverage run --debug=config --module"
       else ""
     } twisted.trial ${extraTrialArgs} ${testSuite'}
     runHook postCheck
@@ -58,6 +58,7 @@ buildPythonPackage rec {
 
   postCheck = if collectCoverage
     then ''
+    python -m coverage combine
     python -m coverage html
     mkdir -p "$doc/share/doc/${name}"
     cp -vr .coverage htmlcov "$doc/share/doc/${name}"
-- 
GitLab