def test_datafile(self): ec = EclConfig() ui = ec.validateDataFile("DoesNotExist") self.assertFalse(ui) dfile = self.createTestPath(DATA_file) ui = ec.validateDataFile(dfile) self.assertTrue(ui) ec.setDataFile(dfile) self.assertEqual(dfile, ec.getDataFile())
def test_init_section(self): ec = EclConfig() dfile = self.createTestPath(DATA_file) difile = self.createTestPath(DATA_INIT_file) ifile = self.createTestPath(INIT_file) ui = ec.validateInitSection(ifile) self.assertFalse(ui) ec.setDataFile(dfile) ui = ec.validateInitSection(ifile) self.assertFalse(ui) ec.setDataFile(difile) ui = ec.validateInitSection(ifile) self.assertTrue(ui) ec.setInitSection(ifile) self.assertTrue(ifile, ec.getInitSection())
def test_schedule_file(self): ec = EclConfig() ui = ec.validateScheduleFile("DoesNotExist") self.assertFalse(ui) dfile = self.createTestPath(DATA_file) sfile = self.createTestPath(SCHEDULE_file) # Setting the schedule file should fail before the datafile # (i.e. startdate) has been set. ui = ec.validateScheduleFile(sfile) self.assertFalse(ui) ec.setDataFile(dfile) ui = ec.validateScheduleFile(sfile) self.assertTrue(ui) ec.setScheduleFile(sfile) self.assertEqual(sfile, ec.getScheduleFile())