def test_postcleanxml(): """Test postcleanxml.""" assert numerate.postcleanxml('test') == 'test' assert numerate.postcleanxml("`") == "'" assert numerate.postcleanxml('C&U;') == 'C&U' assert numerate.postcleanxml(' & ') == ' and ' assert numerate.postcleanxml('\t') == '' assert numerate.postcleanxml('\t\t') == '' assert numerate.postcleanxml('\t\t\t') == '' assert numerate.postcleanxml('\n') == '\n' assert numerate.postcleanxml('\n\n') == '\n' assert numerate.postcleanxml('\n\n\n') == '\n'
def test_cleanxml(): """Test cleanxml.""" stringin = ''' <screen> BBB & CCC C&U; this ' and ` that code DDD & EEE C&U; this ' and ` that code </screen> ''' stringout = ''' <screen>BBB and CCC C&U this ' and ' that code DDD and EEE C&U this ' and ' that code</screen> ''' stringin = numerate.precleanxml(stringin) stringin = numerate.postcleanxml(stringin) assert stringin == stringout