本文整理匯總了Python中ert.enkf.enkf_main.EnKFMain.getRunContextENSEMPLE_EXPERIMENT方法的典型用法代碼示例。如果您正苦於以下問題:Python EnKFMain.getRunContextENSEMPLE_EXPERIMENT方法的具體用法?Python EnKFMain.getRunContextENSEMPLE_EXPERIMENT怎麽用?Python EnKFMain.getRunContextENSEMPLE_EXPERIMENT使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ert.enkf.enkf_main.EnKFMain
的用法示例。
在下文中一共展示了EnKFMain.getRunContextENSEMPLE_EXPERIMENT方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_run_context
# 需要導入模塊: from ert.enkf.enkf_main import EnKFMain [as 別名]
# 或者: from ert.enkf.enkf_main.EnKFMain import getRunContextENSEMPLE_EXPERIMENT [as 別名]
def test_run_context(self):
with TestAreaContext("enkf_test") as work_area:
work_area.copy_directory(self.case_directory)
main = EnKFMain("simple_config/minimum_config")
fs_manager = main.getEnkfFsManager()
fs = fs_manager.getCurrentFileSystem( )
iactive = BoolVector(initial_size = 10 , default_value = True)
iactive[0] = False
iactive[1] = False
run_context = main.getRunContextENSEMPLE_EXPERIMENT( fs , iactive )
self.assertEqual( len(run_context) , 8 )
with self.assertRaises(IndexError):
run_context[8]
with self.assertRaises(TypeError):
run_context["String"]
run_arg = run_context[0]
self.assertTrue( isinstance( run_arg , RunArg ))
with self.assertRaises(ValueError):
run_context.iensGet(0)
with self.assertRaises(ValueError):
run_context.iensGet(1)
arg0 = run_context[0]
arg2 = run_context.iensGet( 2 )