Skip to content
Browse files

Fix testing with clustalw 1.83

Old test worked with clustalw 2.1 but the behaviour of 1.83 was
slightly different leading to the unit test wrongly failing:
http://lists.open-bio.org/pipermail/biopython-dev/2013-May/010599.html
  • Loading branch information...
1 parent a3bb49b commit 859d07f3c5e8b789156a5ec2e98f4153ab896e00 @peterjc peterjc committed May 13, 2013
Showing with 9 additions and 4 deletions.
  1. +9 −4 Tests/test_Clustalw_tool.py
View
13 Tests/test_Clustalw_tool.py
@@ -158,12 +158,17 @@ def test_single_sequence(self):
try:
stdout, stderr = cline()
-
- #Zero return code is a possible bug in clustal?
- self.add_file_to_clean(input_file + ".aln")
+ #Zero return code is a possible bug in clustalw 2.1?
self.assertTrue("cannot do multiple alignment" in (stdout + stderr))
except ApplicationError, err:
- self.assertTrue(str(err) == "No records found in handle")
+ #Good, non-zero return code indicating an error in clustalw
+ #e.g. Using clustalw 1.83 get:
+ #Command 'clustalw -infile=Fasta/f001' returned non-zero exit status 4
+ pass
+
+ if os.path.isfile(input_file + ".aln"):
+ #Clustalw 2.1 made an emtpy aln file, clustalw 1.83 did not
+ self.add_file_to_clean(input_file + ".aln")
def test_invalid_sequence(self):
"""Test an input file containing an invalid sequence."""

0 comments on commit 859d07f

Please sign in to comment.
Something went wrong with that request. Please try again.