1
0
forked from VimPlug/jedi

Fix a few issues around duplicated import paths, fixes #2033

This commit is contained in:
Dave Halter
2024-11-25 00:52:47 +01:00
parent 41e9e957e7
commit ecb922c6ff
2 changed files with 10 additions and 5 deletions

View File

@@ -318,9 +318,14 @@ def test_duplicated_import(Script):
s = 'from os import path, p'
assert 'path' not in import_names(s)
assert 'path' in import_names(s, column=len(s) - 3)
assert 'path' in import_names("from import path")
assert 'path' in import_names("from import chdir, path")
s = 'import path as pp, p'
assert 'path' not in import_names(s)
s = 'import math as mm, m'
assert 'math' not in import_names(s)
s = 'import math as os, o'
assert 'os' in import_names(s)
s = 'from os import path as pp, p'
assert 'path' not in import_names(s)