예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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)