Skip to content

Commit 233ec29

Browse files
committed
Fix test failure with updated lxml
1 parent cfe9c58 commit 233ec29

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/calibre/library/comments.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ def test_comments_to_html(self):
165165
('a <?xml asd> b\n\ncd',
166166
'<p class="description">a b</p><p class="description">cd</p>'),
167167
]:
168-
cval = comments_to_html(pat)
168+
import warnings # lxml + beautifulsoup raise a deprecation warning causing test to fail in CI
169+
with warnings.catch_warnings():
170+
cval = comments_to_html(pat)
169171
self.assertEqual(cval, val)
170172

171173
return unittest.defaultTestLoader.loadTestsFromTestCase(Test)

0 commit comments

Comments
 (0)