Skip to content

Commit

Permalink
Python 2.6 unittest lacks assertLessEqual etc
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Oct 21, 2015
1 parent abf7668 commit c06a306
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/test_NCBI_qblast.py
Expand Up @@ -102,14 +102,14 @@ def run_qblast(self, program, database, query, e_value, entrez_filter, expected_
# Check the recorded input parameters agree with those requested
self.assertEqual(float(record.expect), e_value)
self.assertEqual(record.application.lower(), program)
self.assertLessEqual(len(record.alignments), 10)
self.assertLessEqual(len(record.descriptions), 10)
self.assertTrue(len(record.alignments) <= 10)
self.assertTrue(len(record.descriptions) <= 10)

# Check the expected result(s) are found in the alignments
if expected_hits is None:
self.assertEqual(len(record.alignments), 0) # Expected no alignments!
else:
self.assertGreater(len(record.alignments), 0) # Expected some alignments!
self.assertTrue(len(record.alignments) > 0) # Expected some alignments!
found_result = False
for expected_hit in expected_hits:
for alignment in record.alignments:
Expand All @@ -129,7 +129,7 @@ def run_qblast(self, program, database, query, e_value, entrez_filter, expected_
if expected_hits is None:
self.assertEqual(len(record.descriptions), 0) # Expected no descriptions!
else:
self.assertGreater(len(record.descriptions), 0) # Expected some descriptions!
self.assertTrue(len(record.descriptions) > 0) # Expected some descriptions!
found_result = False
for expected_hit in expected_hits:
for descr in record.descriptions:
Expand Down

0 comments on commit c06a306

Please sign in to comment.