Skip to content

Commit

Permalink
Speed up tests and add badges to README
Browse files Browse the repository at this point in the history
  • Loading branch information
rrwick committed Jan 4, 2019
1 parent c028607 commit 5b4e503
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
@@ -0,0 +1,2 @@
[run]
source = badread
6 changes: 3 additions & 3 deletions test/test_simulate.py
Expand Up @@ -57,8 +57,8 @@ class TestSequenceFragment(unittest.TestCase):
def setUp(self):
self.null = open(os.devnull, 'w')
self.trials = 20
self.identities_to_test = [1.0, 0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.65]
self.read_lengths_to_test = [10000, 3000, 1000]
self.identities_to_test = [1.0, 0.9, 0.8, 0.7]
self.read_lengths_to_test = [3000, 1000]
self.read_delta = 0.5
self.mean_delta = 0.05
self.repo_dir = pathlib.Path(__file__).parent.parent
Expand Down Expand Up @@ -87,7 +87,7 @@ def identity_test(self, target_identity, read_length, error_model, qscore_model)
read_identities.append(read_identity)

if VERBOSE:
print('{read_identity:.4f}', flush=True,
print('{:.4f}'.format(read_identity), flush=True,
end='\n ' if (i+1) % 20 == 0 else ' ')

self.assertAlmostEqual(read_identity, target_identity, delta=read_delta)
Expand Down

0 comments on commit 5b4e503

Please sign in to comment.