Skip to content

Commit

Permalink
#222: Fix pyop2 cache clear
Browse files Browse the repository at this point in the history
  • Loading branch information
ddundo committed Oct 14, 2024
1 parent 30b7c2b commit 73e38f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ def pytest_runtest_teardown(item, nextitem):
"""
Clear caches after running a test
"""
# TODO #222: GlobalKernel no longer has _cache attribute
from firedrake.tsfc_interface import clear_cache
# from pyop2.global_kernel import GlobalKernel
from pyop2.caching import clear_memory_cache

clear_cache()
# GlobalKernel._cache.clear()
clear_memory_cache()
5 changes: 2 additions & 3 deletions test_adjoint/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,11 @@ def pytest_runtest_teardown(item, nextitem):
"""
Clear caches after running a test
"""
# TODO #222: GlobalKernel no longer has _cache attribute
from firedrake.tsfc_interface import clear_cache
# from pyop2.global_kernel import GlobalKernel
from pyop2.caching import clear_memory_cache

clear_cache()
# GlobalKernel._cache.clear()
clear_memory_cache()


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit 73e38f4

Please sign in to comment.