Exemplo n.º 1
0
    def test_ecl_config_creation(self):
        with self.assertRaises(NotImplementedError):
            ecl_config = EclConfig()

        with TestAreaContext("enkf_library_test") as work_area:
            work_area.copy_directory(self.case_directory)

            main = EnKFMain("simple_config/minimum_config", self.site_config)

            self.assertIsInstance(main.analysis_config(), AnalysisConfig)
            self.assertIsInstance(main.ecl_config(), EclConfig)

            with self.assertRaises(AttributeError):
                self.assertIsInstance(main.ecl_config().get_refcase(), EclSum)

            time_map = main.get_fs().get_time_map()
            self.assertIsInstance(time_map, TimeMap)

            del main
Exemplo n.º 2
0
    def test_config( self ):
        with TestAreaContext("enkf_test") as work_area:
            work_area.copy_directory(self.case_directory)

            main = EnKFMain("simple_config/minimum_config", self.site_config_file)

            self.assertIsInstance(main.ensembleConfig(), EnsConfig)
            self.assertIsInstance(main.analysis_config(), AnalysisConfig)
            self.assertIsInstance(main.getModelConfig(), ModelConfig)
            #self.assertIsInstance(main.local_config(), LocalConfig) #warn: Should this be None?
            self.assertIsInstance(main.siteConfig(), SiteConfig)
            self.assertIsInstance(main.ecl_config(), EclConfig)
            self.assertIsInstance(main.plot_config(), PlotConfig)

            # self.main.load_obs(obs_config_file)
            self.assertIsInstance(main.get_obs(), EnkfObs)
            self.assertIsInstance(main.get_templates(), ErtTemplates)
            self.assertIsInstance(main.getFileSystem(), EnkfFs)
            # self.assertIsInstance(main.iget_member_config(0), MemberConfig)
            self.assertIsInstance(main.getMemberRunningState(0), EnKFState)

            del main