def test_report_list(self): rlist0 = range(63) self.report_list_file_test(self.u_file, rlist0) rlist0 = [0] self.report_list_file_test(self.xfile0, rlist0) f = EclFile(self.grid_file) with self.assertRaises(ArgumentError): #argumentError wraps the expected TypeError EclFile.file_report_list(f)
def test_report_list(self): rlist0 = range(63) self.report_list_file_test(self.u_file, rlist0) rlist0 = [0] self.report_list_file_test(self.xfile0, rlist0) f = EclFile(self.grid_file) with self.assertRaises( ArgumentError): #argumentError wraps the expected TypeError EclFile.file_report_list(f)
def report_list_file_test(self, fname, rlist0): rlist = EclFile.file_report_list(fname) self.assertAlmostEqualList(rlist, rlist0) f = EclFile(fname) rlist = f.report_list self.assertAlmostEqualList(rlist, rlist0)
def report_list_file_test(self, fname, rlist0): rlist = EclFile.file_report_list(fname) self.assertListEqual(rlist, rlist0) f = EclFile(fname) rlist = f.report_list self.assertListEqual(rlist, rlist0)