Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SooLee committed Apr 30, 2018
1 parent 45f3428 commit dfd49e2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
12 changes: 6 additions & 6 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ def test_querys_2_bad_order(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# trigger a warning
it = self.pr.querys2D(query)
self.pr.querys2D(query)
# verify some things about the warning
assert len(w) == 1
assert issubclass(w[-1].category, pypairix.PairixWarning)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, pypairix.PairixWarning))

def test_build_index_with_force_merged_nodups_tab(self): ## recognizing custom set
pypairix.build_index(TEST_FILE_2D, sc=2, bc=3, ec=3, sc2=6, bc2=7, ec2=7, force=1)
Expand Down Expand Up @@ -300,10 +300,10 @@ def test_query2_rev_fail(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# trigger a warning
it = self.pr.query2D(self.chrom, self.start, self.end, self.chrom2, self.start2, self.end2)
self.pr.query2D(self.chrom, self.start, self.end, self.chrom2, self.start2, self.end2)
# verify some things about the warning
assert len(w) == 1
assert issubclass(w[-1].category, pypairix.PairixWarning)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, pypairix.PairixWarning))


## 2D query on 2D indexed file with chromosomes using a 4DN pairs file
Expand Down
2 changes: 2 additions & 0 deletions test/test_c.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

PATH=./bin:$PATH

if [ $VALGRIND_TEST_ON -eq 1 ]; then
Expand Down
2 changes: 2 additions & 0 deletions test/test_c_oldindex.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

PATH=./bin:$PATH

if [ $VALGRIND_TEST_ON -eq 1 ]; then
Expand Down
2 changes: 2 additions & 0 deletions test/test_c_oldindex2.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

PATH=./bin:$PATH

if [ $VALGRIND_TEST_ON -eq 1 ]; then
Expand Down
12 changes: 6 additions & 6 deletions test/test_oldindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ def test_querys_2_bad_order(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# trigger a warning
it = self.pr.querys2D(query)
self.pr.querys2D(query)
# verify some things about the warning
assert len(w) == 1
assert issubclass(w[-1].category, pypairix.PairixWarning)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, pypairix.PairixWarning))


## 2D query on 2D indexed file with chromosomes input in reverse order
Expand Down Expand Up @@ -283,10 +283,10 @@ def test_query2_rev_fail(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# trigger a warning
it = self.pr.query2D(self.chrom, self.start, self.end, self.chrom2, self.start2, self.end2)
self.pr.query2D(self.chrom, self.start, self.end, self.chrom2, self.start2, self.end2)
# verify some things about the warning
assert len(w) == 1
assert issubclass(w[-1].category, pypairix.PairixWarning)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, pypairix.PairixWarning))


## 2D query on 2D indexed file with chromosomes using a 4DN pairs file
Expand Down
12 changes: 6 additions & 6 deletions test/test_oldindex2.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ def test_querys_2_bad_order(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# trigger a warning
it = self.pr.querys2D(query)
self.pr.querys2D(query)
# verify some things about the warning
assert len(w) == 1
assert issubclass(w[-1].category, pypairix.PairixWarning)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, pypairix.PairixWarning))


## 2D query on 2D indexed file with chromosomes input in reverse order
Expand Down Expand Up @@ -282,10 +282,10 @@ def test_query2_rev_fail(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
# trigger a warning
it = self.pr.query2D(self.chrom, self.start, self.end, self.chrom2, self.start2, self.end2)
self.pr.query2D(self.chrom, self.start, self.end, self.chrom2, self.start2, self.end2)
# verify some things about the warning
assert len(w) == 1
assert issubclass(w[-1].category, pypairix.PairixWarning)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, pypairix.PairixWarning))


## 2D query on 2D indexed file with chromosomes using a 4DN pairs file
Expand Down

0 comments on commit dfd49e2

Please sign in to comment.