Exemplo n.º 1
0
def test_transformer_is_keyword_future(syntax_error, keyword):
    token = Token('any', keyword)
    with raises(StorySyntaxError):
        Transformer.is_keyword(token)
    name = 'future_reserved_keyword'
    format = {'keyword': keyword}
    syntax_error.assert_called_with(name, token=token, format=format)
Exemplo n.º 2
0
def test_transformer_is_keyword_future(syntax_error, keyword):
    token = Token("any", keyword)
    with raises(StorySyntaxError):
        Transformer.is_keyword(token)
    name = "future_reserved_keyword"
    format = {"keyword": keyword}
    syntax_error.assert_called_with(name, token=token, format_args=format)
Exemplo n.º 3
0
def test_transformer_is_keyword(syntax_error, keyword):
    token = Token('any', keyword)
    with raises(StorySyntaxError):
        Transformer.is_keyword(token)
    name = 'reserved_keyword_{}'.format(keyword)
    syntax_error.assert_called_with(name, token=token)