def test_try_all_threshold(self): fig, ax = try_all_threshold(self.image) all_texts = [axis.texts for axis in ax if axis.texts != []] text_content = [text.get_text() for x in all_texts for text in x] assert 'RuntimeError' in text_content