def test_meta_mode(meta, last_action, expected): atom = '{MODE:' + meta + '}' ctx = formatting._Context((), action()) ctx.translated(last_action) if inspect.isclass(expected): with pytest.raises(expected): formatting._atom_to_action(atom, ctx) else: assert formatting._atom_to_action(atom, ctx) == expected
def test_meta_carry_capitalize(meta, last_action, expected): ctx = formatting._Context((), action()) ctx.translated(last_action) assert formatting._atom_to_action('{' + meta + '}', ctx) == expected
def test_meta_mode(meta, last_action, expected): ctx = formatting._Context((), action()) ctx.translated(last_action) assert formatting._atom_to_action('{MODE:' + meta + '}', ctx) == expected
def test_atom_to_action(atom, last_action, expected): ctx = formatting._Context((), last_action) ctx.translated(last_action) assert formatting._atom_to_action(atom, ctx) == expected
def test_atom_to_action(atom, last_action, spaces_after, expected): assert formatting._atom_to_action(atom, last_action, spaces_after) == expected