예제 #1
0
파일: __init__.py 프로젝트: bbonf/matcha
    def test_no_arguments(self):
        p = invocation()
        node, r = p('module.func()')

        eq_(r, '')
        assert_is_instance(node, Invocation)
        eq_(node.func, Symbol('module.func'))
        eq_(node.args, [])
예제 #2
0
파일: __init__.py 프로젝트: bbonf/matcha
    def test_simple(self):
        p = invocation()
        node, r = p('module.func(symbol, 123,"string")')

        eq_(r, '')
        assert_is_instance(node, Invocation)
        eq_(node.func, Symbol('module.func'))
        eq_(node.args[0], Symbol('symbol'))
        eq_(node.args[1], NumericLiteral('123'))
        eq_(node.args[2], StringLiteral('"string"'))