Package org.python.pydev.parser.jython.ast

Examples of org.python.pydev.parser.jython.ast.Module


        assertEquals(5, defM2.beginColumn);
        assertEquals(11, defM2.beginLine);
    }

    public void testDefinitionsParserLines3() {
        Module m = (Module) FastDefinitionsParser.parse("class Bar(object):\n" +
                "    def ra(\n" +
                "\n" +
                "\n"
                +
                "    )\n" +
View Full Code Here


        assertEquals(5, defM2.beginColumn);
        assertEquals(14, defM2.beginLine);
    }

    public void testDefinitionsParserLines4() {
        Module m = (Module) FastDefinitionsParser.parse("class Bar(object):\n" +
                "    def ra(\n" +
                "\n" +
                "\n"
                +
                "    )\n" +
View Full Code Here

        assertEquals(5, defM2.beginColumn);
        assertEquals(9, defM2.beginLine);
    }

    public void testDefinitionsParserLines5() {
        Module m = (Module) FastDefinitionsParser.parse("class Bar(object):\n" +
                "    def m2(self):self.a=10\n");
        assertEquals(1, m.body.length);
        ClassDef classDefBar = (ClassDef) m.body[0];
        assertEquals(1, classDefBar.beginColumn);
        assertEquals(1, classDefBar.beginLine);
View Full Code Here

        assertEquals(18, a.beginColumn);
        assertEquals(2, a.beginLine);
    }

    public void testDefinitionsParserLines6() {
        Module m = (Module) FastDefinitionsParser.parse("class Bar(object):\n" +
                "    def m2(\n" +
                "        self,\n"
                +
                "        a):self.a=10\n");
        assertEquals(1, m.body.length);
View Full Code Here

        assertEquals(12, a.beginColumn);
        assertEquals(4, a.beginLine);
    }

    public void testDefinitionsParserLines7() {
        Module m = (Module) FastDefinitionsParser.parse("class Bar(object):\n" +
                "    def m2 ( \n" +
                "        self,\n"
                +
                "        a ) : self.a=10\n");
        assertEquals(1, m.body.length);
View Full Code Here

        assertEquals(15, a.beginColumn);
        assertEquals(4, a.beginLine);
    }

    public void testDefinitionsParserLines8() {
        Module m = (Module) FastDefinitionsParser.parse("\r\n" +
                "#=\r\n" +
                "#=\r\n" +
                "#=\r\n"
                +
                "class Test(unittest.TestCase):\r\n" +
View Full Code Here

        assertEquals(5, def.beginColumn);
        assertEquals(10, def.beginLine);
    }

    public void testDefinitionsParser10() {
        Module m = (Module) FastDefinitionsParser.parse("" //empty
                );
        assertEquals(0, m.body.length);
    }
View Full Code Here

                );
        assertEquals(0, m.body.length);
    }

    public void testDefinitionsParser13() {
        Module m = (Module) FastDefinitionsParser
                .parse("\n"
                        +
                        "def get_validation_errors(outfile, app=None):\n"
                        +
                        "    '''\n"
View Full Code Here

        assertEquals("get_validation_errors", NodeUtils.getRepresentationString(d.name));
        assertNull(d.body);
    }

    public void testDefinitionsParser14() {
        Module m = (Module) FastDefinitionsParser.parse("\n" +
                "def method():\n" +
                "    a = 10\n" +
                "class F:\n"
                +
                "    def method2(self):\n" +
View Full Code Here

    public void testDefinitionsParser15() {
        FastStringBuffer buf = new FastStringBuffer();
        for (int i = 0; i < 2000; i++) {
            buf.append("class Spam(object): pass\n");
        }
        Module m = (Module) FastDefinitionsParser.parse(buf.toString());
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.ast.Module

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.