Пример #1
0
def test_transformer_path(patch):
    patch.object(Transformer, 'is_keyword')
    result = Transformer.path(['matches'])
    Transformer.is_keyword.assert_called_with('matches')
    assert result == Tree('path', ['matches'])
Пример #2
0
def test_transformer_path(patch):
    patch.object(Transformer, "is_keyword")
    result = Transformer.path(["matches"])
    Transformer.is_keyword.assert_called_with("matches")
    assert result == Tree("path", ["matches"])