本文整理汇总了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())