本文整理匯總了Python中peacock.Input.ExecutableInfo.ExecutableInfo.clearCache方法的典型用法代碼示例。如果您正苦於以下問題:Python ExecutableInfo.clearCache方法的具體用法?Python ExecutableInfo.clearCache怎麽用?Python ExecutableInfo.clearCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類peacock.Input.ExecutableInfo.ExecutableInfo
的用法示例。
在下文中一共展示了ExecutableInfo.clearCache方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testPickle
# 需要導入模塊: from peacock.Input.ExecutableInfo import ExecutableInfo [as 別名]
# 或者: from peacock.Input.ExecutableInfo.ExecutableInfo import clearCache [as 別名]
def testPickle(self):
exe_path = Testing.find_moose_test_exe()
e = ExecutableInfo()
e.clearCache()
e.setPath(exe_path)
p = e.toPickle()
e2 = ExecutableInfo()
e2.fromPickle(p)
self.assertEqual(e2.path_map, e.path_map)
示例2: testTree
# 需要導入模塊: from peacock.Input.ExecutableInfo import ExecutableInfo [as 別名]
# 或者: from peacock.Input.ExecutableInfo.ExecutableInfo import clearCache [as 別名]
def testTree(self):
e = ExecutableInfo()
e.clearCache()
exe_path = Testing.find_moose_test_exe()
e.setPath(exe_path)
root = e.path_map["/"]
self.assertIn("Mesh", root.children_list)
m = root.children["Mesh"]
self.assertEqual(m.hard, True)
self.assertEqual(e.path_map["/Mesh"], m)
out = e.dumpDefaultTree(hard_only=False)
self.assertIn("Partitioner", out)
self.assertIn("Partitioner", out)
self.assertIn("ScalarKernels", out)
self.assertNotIn("DirichletBC", out)
示例3: testInfo
# 需要導入模塊: from peacock.Input.ExecutableInfo import ExecutableInfo [as 別名]
# 或者: from peacock.Input.ExecutableInfo.ExecutableInfo import clearCache [as 別名]
def testInfo(self):
e = ExecutableInfo()
e.clearCache()
e.setPath("")
self.assertFalse(e.valid())
e.setPath("no_exist")
self.assertFalse(e.valid())
exe_path = Testing.find_moose_test_exe()
e.setPath(exe_path)
self.assertTrue(e.valid())
e.setPath(exe_path)
self.assertTrue(e.valid())
e.setPath("")
self.assertTrue(e.valid())
e.setPath("no_exist")
self.assertFalse(e.valid())
# this should hit the cache
e.setPath(exe_path)
self.assertTrue(e.valid())