Skip to content

Commit

Permalink
improve flexibility of assertion for log output
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgehret committed Oct 17, 2024
1 parent 8baf2d6 commit a52890e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rescript/tests/test_ncbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ def test_ncbi_fails(self):
'k__Fungi; p__Basidiomycota; c__Agaricomycetes; '
'o__Boletales; f__Boletaceae; g__Boletus; s__edulis'
)
raise ValueError(log.output)
self.assertTrue('Retrying' in '\n'.join(log.output[:3]))
exp_log_segment = 'Retrying'
self.assertTrue(exp_log_segment in line for line in log.output)

def test_get_ncbi_dirty_tricks(self):
with self.assertLogs(level='WARNING') as log:
Expand Down

0 comments on commit a52890e

Please sign in to comment.