def test_strip(self): result = self.parser.strip("[b]hello \n[i]world[/i][/b] -- []", strip_newlines=True) assert result == "hello world -- " # Not sure if I introduced a subtle bug here # assert result == 'hello world -- []' parser = AdfdParser(typogrify=False, hyphenate=False, tagOpener="<", tagCloser=">", dropUnrecognized=True) result = parser.strip('<div class="test"><b>hello</b> <i>world</i><img src="test.jpg" ' "/></div>") assert result == "hello world"