def test_rex_match_empty(): rm = RexMatch() assert rm['a'] is None assert rm['b'] is None assert str(rm) == '' assert rm.__unicode__() == u''
def test_rex_match(): rm = RexMatch(((0, 'some match'), ('a', 1), ('b', 2))) assert rm['a'] == 1 assert rm['b'] == 2 assert str(rm) == 'some match' assert rm.__unicode__() == u'some match'