Skip to content

Commit

Permalink
Add conftest back for adjoint tape clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
cpjordan committed Oct 22, 2024
1 parent 3f3598d commit 5b79b7e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test_adjoint/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


def pytest_runtest_teardown(item, nextitem):
"""Clear Thetis caches after running a test"""
from pyadjoint import get_working_tape

# clear the adjoint tape, so subsequent tests don't interfere
get_working_tape().clear_tape()

0 comments on commit 5b79b7e

Please sign in to comment.