mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
mark only slow tutorials as slow
This commit is contained in:
parent
7afbe4d7d1
commit
23a6231c21
@ -45,12 +45,10 @@ def getMeshingparameters(filename):
|
||||
return standard[3:] # coarser meshes don't work here
|
||||
return standard
|
||||
|
||||
# TODO: step files do not respect gui meshsizes yet.
|
||||
_geofiles = [f for f in getFiles(".geo")] + [f for f in getFiles(".stl")]
|
||||
if has_occ:
|
||||
_geofiles += [f for f in getFiles(".step")]
|
||||
|
||||
|
||||
def generateMesh(filename, mp):
|
||||
if filename.endswith(".geo"):
|
||||
geo = csg.CSGeometry(os.path.join("..","..","tutorials", filename))
|
||||
@ -60,8 +58,17 @@ def generateMesh(filename, mp):
|
||||
geo = occ.OCCGeometry(os.path.join("..","..","tutorials", filename))
|
||||
return geo.GenerateMesh(**mp)
|
||||
|
||||
@pytest.mark.slow
|
||||
@pytest.mark.parametrize("filename, checkFunc", [(f, getCheckFunc(f)) for f in _geofiles])
|
||||
def isSlowTest(filename):
|
||||
return filename in ["cubemcyl.geo", "frame.step", "revolution.geo", "manyholes.geo", "torus.geo",
|
||||
"cubemsphere.geo", "manyholes2.geo", "matrix.geo", "trafo.geo", "ellipticcone.geo",
|
||||
"period.geo", "shaft.geo", "cubeandring.geo", "ellipticcyl.geo",
|
||||
"ellipsoid.geo", "cone.geo"]
|
||||
|
||||
def getParamForTest(filename):
|
||||
return pytest.param(filename, getCheckFunc(filename), marks=pytest.mark.slow) if isSlowTest(filename) \
|
||||
else (filename, getCheckFunc(filename))
|
||||
|
||||
@pytest.mark.parametrize(("filename, checkFunc"), [getParamForTest(f) for f in _geofiles])
|
||||
def test_geoFiles(filename, checkFunc):
|
||||
for i, mp in enumerate(getMeshingparameters(filename)):
|
||||
print("load geo", filename)
|
||||
|
Loading…
Reference in New Issue
Block a user