Exemple #1
0
    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, [])
Exemple #2
0
    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"'))