mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-28 05:40:34 +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[3:] # coarser meshes don't work here
|
||||||
return standard
|
return standard
|
||||||
|
|
||||||
# TODO: step files do not respect gui meshsizes yet.
|
|
||||||
_geofiles = [f for f in getFiles(".geo")] + [f for f in getFiles(".stl")]
|
_geofiles = [f for f in getFiles(".geo")] + [f for f in getFiles(".stl")]
|
||||||
if has_occ:
|
if has_occ:
|
||||||
_geofiles += [f for f in getFiles(".step")]
|
_geofiles += [f for f in getFiles(".step")]
|
||||||
|
|
||||||
|
|
||||||
def generateMesh(filename, mp):
|
def generateMesh(filename, mp):
|
||||||
if filename.endswith(".geo"):
|
if filename.endswith(".geo"):
|
||||||
geo = csg.CSGeometry(os.path.join("..","..","tutorials", filename))
|
geo = csg.CSGeometry(os.path.join("..","..","tutorials", filename))
|
||||||
@ -60,8 +58,17 @@ def generateMesh(filename, mp):
|
|||||||
geo = occ.OCCGeometry(os.path.join("..","..","tutorials", filename))
|
geo = occ.OCCGeometry(os.path.join("..","..","tutorials", filename))
|
||||||
return geo.GenerateMesh(**mp)
|
return geo.GenerateMesh(**mp)
|
||||||
|
|
||||||
@pytest.mark.slow
|
def isSlowTest(filename):
|
||||||
@pytest.mark.parametrize("filename, checkFunc", [(f, getCheckFunc(f)) for f in _geofiles])
|
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):
|
def test_geoFiles(filename, checkFunc):
|
||||||
for i, mp in enumerate(getMeshingparameters(filename)):
|
for i, mp in enumerate(getMeshingparameters(filename)):
|
||||||
print("load geo", filename)
|
print("load geo", filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user