mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Tests: clean FileFinder cache
This commit is contained in:
parent
ed8ce73838
commit
19c49bb878
1 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import itertools
|
||||
import os
|
||||
import pathlib
|
||||
import pkgutil
|
||||
import re
|
||||
import rlcompleter
|
||||
import select
|
||||
|
|
@ -1131,6 +1132,8 @@ def test_already_imported_custom_module_no_other_suggestions(self):
|
|||
(dir2 / "mymodule").mkdir()
|
||||
(dir2 / "mymodule" / "__init__.py").touch()
|
||||
(dir2 / "mymodule" / "bar.py").touch()
|
||||
# Purge FileFinder cache after adding files
|
||||
pkgutil.get_importer(_dir2).invalidate_caches()
|
||||
# mymodule found in dir2 before dir1, but it was already imported
|
||||
# from dir1 -> suggest dir1 submodules only
|
||||
events = code_to_events("import mymodule.\t\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue