コード例 #1
0
ファイル: test_parser.py プロジェクト: litalidev/pyrep
    def testStringParser(self):
        p = XMLParser(xmlcontent = wrong_xml)
        
        p = XMLParser(xmlcontent = simple_xml)
        
        report = p.parse()

        datasource = range(86)

        r = PDFRenderer(report)
        r.render(datasources = [dataproviders.DataProvider(datasource)], outfile = "out/%s.pdf"%self._testMethodName)
コード例 #2
0
    def testStringParser(self):
        p = XMLParser(xmlcontent=wrong_xml)

        p = XMLParser(xmlcontent=simple_xml)

        report = p.parse()

        datasource = range(86)

        r = PDFRenderer(report)
        r.render(datasources=[dataproviders.DataProvider(datasource)],
                 outfile="out/%s.pdf" % self._testMethodName)
コード例 #3
0
ファイル: test_parser.py プロジェクト: litalidev/pyrep
    def testFileParser(self):
        conn = sqlite3.connect(":memory:")
        cur = conn.cursor()
        cur.execute("CREATE TABLE test_table(id int not null primary key, description varchar(50))")
        for x in range(50):
            cur.execute("INSERT INTO test_table(id, description) values(?, ?)", (x, "Desc %s"%(x + 1)))
        conn.commit()
        cur.close()
        
        p = XMLParser(filename = "test1.xml")
        
        report = p.parse()

        r = PDFRenderer(report)
        r.render(module = sqlite3, conn = conn, outfile = "out/%s.pdf"%self._testMethodName)
コード例 #4
0
    def testFileParser(self):
        conn = sqlite3.connect(":memory:")
        cur = conn.cursor()
        cur.execute(
            "CREATE TABLE test_table(id int not null primary key, description varchar(50))"
        )
        for x in range(50):
            cur.execute("INSERT INTO test_table(id, description) values(?, ?)",
                        (x, "Desc %s" % (x + 1)))
        conn.commit()
        cur.close()

        p = XMLParser(filename="test1.xml")

        report = p.parse()

        r = PDFRenderer(report)
        r.render(module=sqlite3,
                 conn=conn,
                 outfile="out/%s.pdf" % self._testMethodName)