def test_replace_invalid_ncr_comments(): html = '<html><!-- end --></html><!-- trailing -->' fp = StringIO(html) assert ncr.replace_invalid_ncr(fp).read() == html
def test_replace_invalid_ncr(): content = ncr.replace_invalid_ncr(StringIO(elem)) assert content.read() == "<code>Hello •</code>"