Exemplo n.º 1
0
    def test_report(self):
        lx = LaTeX("%s/report_error.tex" % self.statoil_path)
        lx.timeout = 4
        self.assertFalse(lx.compile())

        lx = LaTeX("%s/report_OK.tex" % self.statoil_path)
        self.assertTrue(lx.compile())
Exemplo n.º 2
0
    def test_report(self):
        lx = LaTeX("%s/report_error.tex" % self.statoil_path)
        lx.timeout = 4
        self.assertFalse(lx.compile())

        lx = LaTeX("%s/report_OK.tex" % self.statoil_path)
        self.assertTrue(lx.compile())
Exemplo n.º 3
0
    def test_cleanup(self):
        with TestAreaContext("latex") as work_area:
            work_area.copy_directory_content(self.statoil_path)
            lx = LaTeX("report_OK.tex", in_place=True)
            self.assertTrue(lx.in_place)
            self.assertTrue(lx.compile())
            for ext in ["log", "aux", "nav", "out", "snm", "toc"]:
                self.assertFalse(os.path.exists("report_OK.%s" % ext))

        lx = LaTeX("%s/report_OK.tex" % self.statoil_path, in_place=False)
        self.assertFalse(lx.in_place)
        run_path = lx.runpath
        self.assertTrue(lx.compile())
        self.assertFalse(os.path.exists(run_path))

        lx = LaTeX("%s/report_OK.tex" % self.statoil_path, in_place=False)
        run_path = lx.runpath
        self.assertTrue(lx.compile(cleanup=False))
        self.assertTrue(os.path.exists("%s/report_OK.log" % run_path))
Exemplo n.º 4
0
    def test_cleanup( self ):
        with TestAreaContext("latex") as work_area:
            work_area.copy_directory_content(self.statoil_path)
            lx = LaTeX("report_OK.tex", in_place=True)
            self.assertTrue(lx.in_place)
            self.assertTrue(lx.compile())
            for ext in ["log", "aux", "nav", "out", "snm", "toc"]:
                self.assertFalse(os.path.exists("report_OK.%s" % ext))

        lx = LaTeX("%s/report_OK.tex" % self.statoil_path, in_place=False)
        self.assertFalse(lx.in_place)
        run_path = lx.runpath
        self.assertTrue(lx.compile())
        self.assertFalse(os.path.exists(run_path))

        lx = LaTeX("%s/report_OK.tex" % self.statoil_path, in_place=False)
        run_path = lx.runpath
        self.assertTrue(lx.compile(cleanup=False))
        self.assertTrue(os.path.exists("%s/report_OK.log" % run_path))
Exemplo n.º 5
0
 def test_target(self):
     lx = LaTeX("%s/report_OK.tex" % self.statoil_path)
     self.assertTrue(lx.compile())
     self.assertTrue(os.path.exists(lx.target))
Exemplo n.º 6
0
    def test_simple_compile(self):
        lx = LaTeX("%s/test_OK.tex" % self.local_path)
        self.assertTrue(lx.compile())

        lx = LaTeX("%s/test_error.tex" % self.local_path)
        self.assertFalse(lx.compile())
Exemplo n.º 7
0
 def test_target(self):
     lx = LaTeX("%s/report_OK.tex" % self.statoil_path)
     self.assertTrue(lx.compile())
     self.assertTrue(os.path.exists(lx.target))
Exemplo n.º 8
0
    def test_simple_compile(self):
        lx = LaTeX("%s/test_OK.tex" % self.local_path)
        self.assertTrue(lx.compile())

        lx = LaTeX("%s/test_error.tex" % self.local_path)
        self.assertFalse(lx.compile())