本文整理汇总了Python中TestCase.TestCase.run_test方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase.run_test方法的具体用法?Python TestCase.run_test怎么用?Python TestCase.run_test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestCase.TestCase
的用法示例。
在下文中一共展示了TestCase.run_test方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from TestCase import TestCase [as 别名]
# 或者: from TestCase.TestCase import run_test [as 别名]
#.........这里部分代码省略.........
statbeam3d.test_vals = [-8.498274, -8.230638, -8.123824, 6.4095e+04] #last 4 columns
statbeam3d.su2_exec = "SU2_CFD"
statbeam3d.timeout = 1600
statbeam3d.tol = 0.00001
test_list.append(statbeam3d)
# Dynamic beam, 2d
dynbeam2d = TestCase('dynbeam2d')
dynbeam2d.cfg_dir = "fea_fsi/DynBeam_2d"
dynbeam2d.cfg_file = "configBeam_2d.cfg"
dynbeam2d.test_iter = 6
dynbeam2d.test_vals = [-9.420640, -5.365872, -12.430382, 6.5210e+04] #last 4 columns
dynbeam2d.su2_exec = "SU2_CFD"
dynbeam2d.timeout = 1600
dynbeam2d.tol = 0.00001
test_list.append(dynbeam2d)
# FSI, 2d
fsi2d = TestCase('fsi2d')
fsi2d.cfg_dir = "fea_fsi/WallChannel_2d"
fsi2d.cfg_file = "configFSI_2D.cfg"
fsi2d.test_iter = 4
fsi2d.test_vals = [2.000000, 0.500000, -7.777916, -1.139835] #last 4 columns
fsi2d.su2_exec = "SU2_CFD"
fsi2d.timeout = 1600
fsi2d.tol = 0.00001
test_list.append(fsi2d)
######################################
### RUN TESTS ###
######################################
pass_list = [ test.run_test() for test in test_list ]
######################################
### RUN SU2_GEO TESTS ###
######################################
# NACA0012
naca0012_geo = TestCase('naca0012_geo')
naca0012_geo.cfg_dir = "optimization_euler/steady_naca0012"
naca0012_geo.cfg_file = "inv_NACA0012_adv.cfg"
naca0012_geo.test_vals = [0.120011, 0.0816925, 0.0, 1.0] #max thickness, area, twist, chord
naca0012_geo.su2_exec = "SU2_GEO"
naca0012_geo.timeout = 1600
naca0012_geo.tol = 0.00001
pass_list.append(naca0012_geo.run_geo())
test_list.append(naca0012_geo)
######################################
### RUN SU2_DEF TESTS ###
######################################
# Inviscid NACA0012 (triangles)
naca0012_def = TestCase('naca0012_def')
naca0012_def.cfg_dir = "deformation/naca0012"
naca0012_def.cfg_file = "def_NACA0012.cfg"
naca0012_def.test_iter = 400
naca0012_def.test_vals = [4.30698e-15] #residual
naca0012_def.su2_exec = "SU2_DEF"
naca0012_def.timeout = 1600
naca0012_def.tol = 1e-15
pass_list.append(naca0012_def.run_def())