Another time avoiding a memory leak, also part of #1723

This commit is contained in:
Dave Halter
2021-01-14 01:18:00 +01:00
parent 0ff532b937
commit b6fd81f1e1
4 changed files with 15 additions and 8 deletions

View File

@@ -84,8 +84,5 @@ def test_parser_cache_clear(Script):
del parser_cache[script._inference_state.grammar._hashed][script.path]
del script
import jedi
jedi.parser_utils.get_cached_parent_scope.__closure__[0].cell_contents.clear()
gc.collect()
assert module_id not in [id(m) for m in gc.get_referrers(tree.Module)]