mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 15:24:46 +08:00
don't follow imports automatically, there will be an attribute/method later on, that does this. -> #45
This commit is contained in:
@@ -228,9 +228,11 @@ class TestRegression(Base):
|
||||
|
||||
def test_follow_imports_if_possible(self):
|
||||
""" github issue #45 """
|
||||
s = self.complete("import datetime.timedelta; datetime.timedelta")
|
||||
#print s, [r.name.parent() for r in s], [r.type for r in s]
|
||||
#assert 'Import' not in [r.type for r in s]
|
||||
s = self.complete("from datetime import timedelta; timedelta")
|
||||
# type can also point to import, but there will be additional
|
||||
# attributes
|
||||
types = [r.type for r in s]
|
||||
#assert 'Import' not in types and 'Class' in types
|
||||
|
||||
|
||||
class TestFeature(Base):
|
||||
@@ -285,6 +287,5 @@ class TestSpeed(Base):
|
||||
script.get_in_function_call()
|
||||
#print(api.imports.imports_processed)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user