Пример #1
0
def test_get_rule_from_predefined_rules():
    r = Richtypo()
    rule = r._get_rule(ABRule)

    assert rule == ABRule
Пример #2
0
def test_get_rule_from_available():
    r = Richtypo()
    r.available_rules = {'b': Rule(pattern='b', replacement='d')}
    rule = r._get_rule('b')

    assert rule.pattern == 'b'