gh-96465: Clear fractions hash lru_cache under refleak testing (GH-96689)

Automerge-Triggered-By: GH:zware
This commit is contained in:
Zachary Ware 2022-09-08 13:52:07 -05:00 committed by GitHub
parent c06c001b30
commit 9c8f379433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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()