From ebe3e4a675233a578ff2e0b8b0880da5f0175920 Mon Sep 17 00:00:00 2001
From: Gregory Ashton <gregory.ashton@ligo.org>
Date: Mon, 21 May 2018 08:20:12 +1000
Subject: [PATCH] Fix coverage badge to properly show the coverage

---
 .gitlab-ci.yml | 10 +++++-----
 README.md      |  2 +-
 test/tests.py  |  6 ++++--
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd5fbb4e7..b88a77cdb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,11 +22,11 @@ exitcode-jessie:
     - pip install coverage
     - pip install coverage-badge
     - coverage erase
-    - coverage run -a test/prior_tests.py
-    - coverage run -a test/tests.py
-    - coverage run -a test/waveform_generator_tests.py
-    - coverage run -a test/noise_realisation_tests.py
-    - coverage html --include=tupak/*
+    - coverage run --include=tupak/* -a test/prior_tests.py
+    - coverage run --include=tupak/* -a test/tests.py
+    - coverage run --include=tupak/* -a test/waveform_generator_tests.py
+    - coverage run --include=tupak/* -a test/noise_realisation_tests.py
+    - coverage html
     - coverage-badge -o coverage_badge.svg -f
   artifacts:
     paths:
diff --git a/README.md b/README.md
index 08f2f9699..3fd3060db 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 [![pipeline status](https://git.ligo.org/Monash/tupak/badges/master/pipeline.svg)](https://git.ligo.org/Monash/tupak/commits/master)
-[![coverage report](https://monash.docs.ligo.org/tupak/coverage_report.svg)](
+[![coverage report](https://monash.docs.ligo.org/tupak/coverage_badge.svg)](
 https://monash.docs.ligo.org/tupak/)
 
 # Tupak
diff --git a/test/tests.py b/test/tests.py
index 07f09b9bb..fabe4559b 100644
--- a/test/tests.py
+++ b/test/tests.py
@@ -57,8 +57,10 @@ class Test(unittest.TestCase):
         priors['luminosity_distance'] = tupak.prior.Uniform(
             name='luminosity_distance', minimum=dL - 10, maximum=dL + 10)
 
-        result = tupak.sampler.run_sampler(likelihood, priors, sampler='nestle')
-        self.assertAlmostEqual(np.mean(result.samples), dL, delta=np.std(result.samples))
+        result = tupak.sampler.run_sampler(
+            likelihood, priors, sampler='nestle', verbose=False, npoints=100)
+        self.assertAlmostEqual(np.mean(result.samples), dL,
+                               delta=np.std(result.samples))
 
 
 if __name__ == '__main__':
-- 
GitLab