def testCRiModule(self): """Check the cri module.""" print("cri test is disabled") return if os.path.exists("tmp/criout.rib"): os.remove("tmp/criout.rib") if os.path.exists("tmp/cinclude.rib"): os.remove("tmp/cinclude.rib") # ri = cgkit.cri.loadRI(None) ri = cgkit.cri.loadRI("3delight") # ri = cgkit.cri.loadRI("ri") # ri = cgkit.cri.loadRI("aqsis_core") # ri = cgkit.cri.loadRI("ri2rib") # ri = cgkit.cri.loadRI("prman") # ri.RiProcFree = None ritest.main(ri, "tmp/criout.rib", archiveName="tmp/cinclude.rib") f = open("tmp/criout_norm.rib", "wt") ritest.normalizeRIB(open("tmp/criout.rib", "rt"), f) f.close() f = open("tmp/cinclude_norm.rib", "wt") ritest.normalizeRIB(open("tmp/cinclude.rib", "rt"), f) f.close() self.assertFiles("tmp/criout_norm.rib", "data/riout_ref.rib") self.assertFiles("tmp/cinclude_norm.rib", "data/cinclude_ref.rib")
def testCRiModule(self): """Check the cri module.""" print ("cri test is disabled") return if os.path.exists("tmp/criout.rib"): os.remove("tmp/criout.rib") if os.path.exists("tmp/cinclude.rib"): os.remove("tmp/cinclude.rib") # ri = cgkit.cri.loadRI(None) ri = cgkit.cri.loadRI("3delight") # ri = cgkit.cri.loadRI("ri") # ri = cgkit.cri.loadRI("aqsis_core") # ri = cgkit.cri.loadRI("ri2rib") # ri = cgkit.cri.loadRI("prman") # ri.RiProcFree = None ritest.main(ri, "tmp/criout.rib", archiveName="tmp/cinclude.rib") f = file("tmp/criout_norm.rib", "wt") ritest.normalizeRIB(file("tmp/criout.rib", "rt"), f) f.close() f = file("tmp/cinclude_norm.rib", "wt") ritest.normalizeRIB(file("tmp/cinclude.rib", "rt"), f) f.close() self.assertFiles("tmp/criout_norm.rib", "data/riout_ref.rib") self.assertFiles("tmp/cinclude_norm.rib", "data/cinclude_ref.rib")
def testRiModule(self): """Check the ri module.""" if os.path.exists("tmp/riout.rib"): os.remove("tmp/riout.rib") if os.path.exists("tmp/include.rib"): os.remove("tmp/include.rib") ritest.main(cgkit.ri, "tmp/riout.rib", archiveName="tmp/include.rib") f = file("tmp/riout_norm.rib", "wt") ritest.normalizeRIB(file("tmp/riout.rib", "rt"), f) f.close() f = file("tmp/include_norm.rib", "wt") ritest.normalizeRIB(file("tmp/include.rib", "rt"), f) f.close() self.assertFiles("tmp/riout_norm.rib", "data/riout_ref.rib") self.assertFiles("tmp/include_norm.rib", "data/include_ref.rib")