Skip to content

Commit

Permalink
Fix cache error in test suite (#253)
Browse files Browse the repository at this point in the history
Closes #252
  • Loading branch information
ddundo authored Dec 11, 2024
1 parent 9f4f9bb commit 49e74d5
Showing 1 changed file with 2 additions and 14 deletions.
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)

0 comments on commit 49e74d5

Please sign in to comment.