Skip to content

Commit

Permalink
Show failing output in test_Wise.py
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Oct 27, 2010
1 parent 2ae15f9 commit 811f5ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Tests/test_Wise.py
Expand Up @@ -23,12 +23,14 @@ def setUp(self):
def test_dnal(self):
"""Call dnal, and do a trivial check on its output."""
Wise.align(["dnal"], ("seq1.fna", "seq2.fna"), kbyte=100000, dry_run=True)
self.assertTrue(sys.stdout.getvalue().startswith("dnal -kbyte 100000 seq1.fna seq2.fna"))
output = sys.stdout.getvalue()
self.assertTrue(output.startswith("dnal -kbyte 100000 seq1.fna seq2.fna"), output[:200])

def test_psw(self):
"""Call psw, and do a trivial check on its output."""
Wise.align(["psw"], ("seq1.faa", "seq2.faa"), dry_run=True, kbyte=4)
self.assertTrue(sys.stdout.getvalue().startswith("psw -kbyte 4 seq1.faa seq2.faa"))
output = sys.stdout.getvalue()
self.assertTrue(output.startswith("psw -kbyte 4 seq1.faa seq2.faa"), output[:200])

def tearDown(self):
sys.stdout = self.old_stdout
Expand All @@ -52,7 +54,6 @@ def test_align(self):
self.assertTrue(False, line)



if __name__ == "__main__":
unittest_suite = unittest.TestLoader().loadTestsFromName("test_Wise")
doctest_suite = doctest.DocTestSuite(Wise)
Expand Down

0 comments on commit 811f5ce

Please sign in to comment.