Skip to content

Commit

Permalink
gh-96465: Clear fractions hash lru_cache under refleak testing (GH-96689
Browse files Browse the repository at this point in the history
)

Automerge-Triggered-By: GH:zware
  • Loading branch information
zware committed Sep 8, 2022
1 parent c06c001 commit 9c8f379
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/libregrtest/utils.py
Expand Up @@ -210,3 +210,10 @@ def clear_caches():
else:
for f in typing._cleanups:
f()

try:
fractions = sys.modules['fractions']
except KeyError:
pass
else:
fractions._hash_algorithm.cache_clear()

0 comments on commit 9c8f379

Please sign in to comment.