Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor demo test xfails #1015

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/pymortests/demos.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,13 @@ def nop(*args, **kwargs):
result = None
try:
result = demo()
except QtMissing:
pytest.xfail("Qt missing")
except GmshMissing:
pytest.xfail(f'Gmsh not intalled')
except MeshioMissing:
pytest.xfail(f'meshio not intalled')
except TorchMissing:
pytest.xfail(f'torch not installed')
except (QtMissing, GmshMissing, MeshioMissing, TorchMissing) as e:
if os.environ.get('DOCKER_PYMOR', False):
# these are all installed in our CI env so them missing a grave error
raise e
else:
miss = str(type(e)).replace('Missing', '')
pytest.xfail(f'{miss} not installed')
finally:
stop_gui_processes()

Expand Down