mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-05 07:28:47 +08:00
Properly handle no __getitem__ on CompiledObject
This commit is contained in:
1 parent
fcda62862c
commit
fcda3f7bc5
3 files changed
+22
-3
No files matched your search
@@ -92,3 +92,10 @@ def test_dict_values(Script, environment):
|
||||
# It looks like typeshed for Python 2 returns Any.
|
||||
pytest.skip()
|
||||
assert Script('import sys\nsys.modules["alshdb;lasdhf"]').goto_definitions()
|
||||
|
||||
|
||||
def test_getitem_on_none(Script):
|
||||
script = Script('None[1j]')
|
||||
assert not script.goto_definitions()
|
||||
issue, = script._evaluator.analysis
|
||||
assert issue.name == 'type-error-not-subscriptable'
|
||||
Reference in new issue
Block a user