Commit ebe3e4a6 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix coverage badge to properly show the coverage

parent c1b23cd1
Pipeline #19730 failed with stages
in 1 minute and 28 seconds
......@@ -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:
......
[![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
......
......@@ -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__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment