Skip to content

Commit

Permalink
Add failing test for jedi.api.names(..., all_scopes=False)
Browse files Browse the repository at this point in the history
  • Loading branch information
immerrr committed Aug 16, 2018
1 parent d6306a0 commit 64e846b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_api/test_defined_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ def f(): pass
self.assert_definition_names(subsubdefs, ['L3', 'f'])
self.assert_definition_names(subsubdefs[0].defined_names(), ['f'])

def test_class_fields_with_all_scopes_false(self):
definitions = self.check_defined_names("""
from module import f
g = f(f)
class C:
h = g
""", ['f', 'g', 'C'])
subdefs = definitions[-1].defined_names()
self.assert_definition_names(subdefs, ['h'])


def test_follow_imports(environment):
# github issue #344
Expand Down

0 comments on commit 64e846b

Please sign in to comment.