def test_sub_module():
 defs = jedi.Script('from jedi.api import classes; classes').goto_definitions()
 assert ([d.full_name for d in defs] == ['jedi.api.classes'])
 defs = jedi.Script('import jedi.api; jedi.api').goto_definitions()
 assert ([d.full_name for d in defs] == ['jedi.api'])

def test_sub_module ( ) : defs = jedi . Script ( 'from jedi.api import classes; classes' ) . goto_definitions ( ) assert ( [ d . full_name for d in defs ] == [ 'jedi.api.classes' ] ) defs = jedi . Script ( 'import jedi.api; jedi.api' ) . goto_definitions ( ) assert ( [ d . full_name for d in defs ] == [ 'jedi.api' ] )
full_name needs to check sys .