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

Fix cache error in test suite #253

Merged
merged 2 commits into from
Dec 11, 2024
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
16 changes: 2 additions & 14 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
"""
Global pytest configuration.

**Disclaimer: some functions copied from firedrake/src/tests/conftest.py
**Disclaimer: some functions copied from firedrake/tests/firedrake/conftest.py
"""


def pytest_configure(config):
"""
Register an additional marker.

**Disclaimer: copied from firedrake/src/tests/conftest.py
**Disclaimer: copied from firedrake/tests/firedrake/conftest.py
"""
config.addinivalue_line(
"markers",
"slow: mark test as slow to run",
)


def pytest_runtest_teardown(item, nextitem):
"""
Clear caches after running a test
"""
from firedrake.tsfc_interface import clear_cache
from pyop2.caching import clear_memory_cache
from pyop2.mpi import COMM_WORLD

clear_cache()
clear_memory_cache(COMM_WORLD)
Loading