Example #1
0
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&amp;U this ' and ' that code
DDD and EEE C&amp;U this ' and ' that code</screen>
'''

    stringin = numerate.precleanxml(stringin)
    stringin = numerate.postcleanxml(stringin)
    assert stringin == stringout
Example #2
0
def test_precleanxml():
    """Test precleanxml."""
    assert numerate.precleanxml(' ') == ' '
    assert numerate.precleanxml('o  o') == 'o o'
    assert numerate.precleanxml('o   o') == 'o o'