def test(self): def build(): prog("hello", objs = [obj(["main.c", "hello.c"])]) mem.do_build(self.root, build) self.assert_all_files_exist()
def test(self): def build(): pdflatex("simple.tex") mem.do_build(self.root, build) self.assert_all_files_exist()
def test(self): def build(): obj(["hello.c", 'main.c']) mem.do_build(self.root, build) self.assert_all_files_exist()
def test(self): def build(): pdflatex("simple.tex") mem.do_build(self.root, build) mem.Mem.destroy() self.assert_all_files_exist() h = FileHash("simple.pdf") os.unlink("simple.pdf") # TODO: ensure here that the file is restored and not rebuild # Currently, I have no idea how this could be done mem.do_build(self.root, build) self.assert_all_files_exist() ok_(not h.changed)
def test(self): def build(): pdflatex("simple_c.tex") shutil.copy("simple.tex", "simple_c.tex") mem.do_build(self.root, build) mem.Mem.destroy() self.assert_all_files_exist() h = FileHash("simple_c.pdf") shutil.copy("simple1.tex", "simple_c.tex") # TODO: ensure the file is rebuild, not restored mem.do_build(self.root, build) self.assert_all_files_exist() ok_(h.changed)