def test_bbcode(): document = leaf.parse(sample) bbcode = document.parse(bbcode_formatter, 'http://example.com/') bbcode = leaf.strip_spaces(bbcode) bbcode = leaf.strip_symbols(bbcode) bbcode = leaf.strip_linebreaks(bbcode) assert bbcode == leaf.to_unicode(sample_result), "Sample bbcode formatter"
def test_strip_spaces(): assert leaf.strip_spaces(' blah sdsdf a adddd d ') == 'blah sdsdf a adddd d', "Strip excess spaces from a string"
def test_strip_spaces(): assert leaf.strip_spaces( ' blah sdsdf a adddd d ' ) == 'blah sdsdf a adddd d', "Strip excess spaces from a string"