Big refactoring: BaseDefinition._definnition changes to BaseDefinition._name, because it's a NamePart now.

This also includes changes to tests and some simplifications like deleting the old name logic of Definition.
This commit is contained in:
Dave Halter
2014-09-11 01:02:20 +02:00
parent 58526e2302
commit 9f16555f47
4 changed files with 50 additions and 96 deletions

View File

@@ -26,4 +26,4 @@ asdfasdf""" + "h"
def test_tokenizer_with_string_literal_backslash():
import jedi
c = jedi.Script("statement = u'foo\\\n'; statement").goto_definitions()
assert c[0]._definition.parent.parent.obj == 'foo'
assert c[0]._name.parent.parent.obj == 'foo'