Skip to content

Commit

Permalink
pythongh-96465: Clear fractions hash lru_cache under refleak testing
Browse files Browse the repository at this point in the history
  • Loading branch information
zware committed Sep 8, 2022
1 parent aa3b4cf commit 1c68a75
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/libregrtest/utils.py
Original file line number Diff line number Diff line change
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 1c68a75

Please sign in to comment.