Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/firedrake/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Global test configuration."""

import functools
import os
import sys

Expand All @@ -12,6 +13,7 @@
from petsctools import get_external_packages


@functools.cache
def _skip_test_dependency(dependency):
"""
Returns whether to skip tests with a certain dependency.
Expand Down Expand Up @@ -92,7 +94,6 @@ def _skip_test_dependency(dependency):
("matplotlib", "skipplot", "Matplotlib is not installed"),
("netgen", "skipnetgen", "Netgen and ngsPETSc are not installed"),
("vtk", "skipvtk", "VTK is not installed"),

)


Expand Down Expand Up @@ -164,7 +165,7 @@ def pytest_collection_modifyitems(session, config, items):
item.add_marker(pytest.mark.skip(reason="Test makes no sense unless in complex mode"))

for dep, marker, reason in dependency_skip_markers_and_reasons:
if _skip_test_dependency(dep) and item.get_closest_marker(marker) is not None:
if item.get_closest_marker(marker) is not None and _skip_test_dependency(dep):
item.add_marker(pytest.mark.skip(reason))


Expand Down
Loading