From a52890e9c9bb7d11179fd22da4fdbd4dce0fe0ef Mon Sep 17 00:00:00 2001 From: Liz Gehret Date: Thu, 17 Oct 2024 13:26:36 -0600 Subject: [PATCH] improve flexibility of assertion for log output --- rescript/tests/test_ncbi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rescript/tests/test_ncbi.py b/rescript/tests/test_ncbi.py index 00ebc0f..d0e2260 100644 --- a/rescript/tests/test_ncbi.py +++ b/rescript/tests/test_ncbi.py @@ -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: