Skip to content

Commit

Permalink
Make call to to-be-tested function explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Mar 18, 2024
1 parent 791a87c commit fb9ebba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ixmp/tests/backend/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_cache_invalidate(self, test_mp):
def test_del_ts(self, test_mp, request):
"""Test CachingBackend.del_ts()."""
# Since CachingBackend is an abstract class, test it via JDBCBackend
backend = test_mp._backend
backend: CachingBackend = test_mp._backend # type: ignore
cache_size_pre = len(backend._cache)

# Load data, thereby adding to the cache
Expand All @@ -155,7 +155,7 @@ def test_del_ts(self, test_mp, request):
s.__del__() # Force deletion of cached objects associated with `s`

# Delete the object; associated cache is freed
del s
backend.del_ts(s)

# Objects were invalidated/removed from cache
assert cache_size_pre == len(backend._cache)

0 comments on commit fb9ebba

Please sign in to comment.