8000 gh-134235: Import Autocomplete for Builtin Modules by tommix626 · Pull Request #134277 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-134235: Import Autocomplete for Builtin Modules #134277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 19, 2025
Prev Previous commit
Next Next commit
clean up unneed test
  • Loading branch information
tommix626 committed May 19, 2025
commit 0fbeb765a95a12e7d54a36c06c68a778039ef6af
20 changes: 3 additions & 17 deletions Lib/test/test_pyrepl/test_pyrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,29 +969,15 @@ def test_builtin_completion_top_level(self):
sys.path = [lib_path]

cases = (
# Basic import completion
("import tim\t\n", "import time"),
("import sys\t\t\n", "import sys"), # should pass?
("import sys\t\t\n", "import sys"),
("import mat\t\n", "import math"),
("import bui\t\n", "import builtins"),

# Multiple imports
("import foo, ti\t\n", "import foo, time"),
("import foo, sys\t\n", "import foo, sys"),

# Import with alias
("import tim\t as t\n", "import time as t"),
("import math as m, sys\t\n", "import math as m, sys"),

# From-import with top level
("from mat\t\n", "from math"),
("from ma\t\tt\t\n", "from math"),

# From-import for modules
("from bui\t\n", "from builtins"),

# not matching anything
("import ll\t\t\n", "import ll")
("import foo, ti\t\n", "import foo, time"),
("import foo, sys\t\n", "import foo, sys"),
)
for code, expected in cases:
with self.subTest(code=code):
Expand Down
0