-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cache error in test suite (#253)
Closes #252
- Loading branch information
Showing
1 changed file
with
2 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |