Skip to content

Commit

Permalink
Merge pull request #621 from edreamleo/ekr-file-builtin
Browse files Browse the repository at this point in the history
PR for #616: failing unit test after removing 'file' from rope.base.builtins
  • Loading branch information
lieryan committed Dec 22, 2022
2 parents bb125bc + d5ba415 commit f744d2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion rope/base/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,6 @@ def _input_function(args):
"tuple": BuiltinName(get_tuple_type()),
"set": BuiltinName(get_set_type()),
"str": BuiltinName(get_str_type()),
"file": BuiltinName(get_file_type()),
"open": BuiltinName(BuiltinFunction(function=_open_function, builtin=open)),
"range": BuiltinName(BuiltinFunction(function=_range_function, builtin=range)),
"reversed": BuiltinName(
Expand Down
8 changes: 7 additions & 1 deletion ropetest/contrib/codeassisttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ class GlobalClass(object): pass
self.assert_completion_in_result("GlobalClass", "global", result, type="class")

def test_builtin_class_completion_proposal(self):
for varname in ("object", "dict", "file"):
for varname in ("object", "dict"):
result = self._assist(varname[0])
self.assert_completion_in_result(varname, "builtin", result, type="class")

Expand Down Expand Up @@ -1188,6 +1188,12 @@ def test_builtin_function_completion_proposal(self):
self.assert_completion_in_result(
expected, "builtin", result, type="function"
)
code2 = "o"
result = self._assist(code2)
for expected in ("open",):
self.assert_completion_in_result(
expected, "builtin", result, type="function"
)

def test_attribute_function_completion_proposal(self):
code = dedent("""\
Expand Down

0 comments on commit f744d2a

Please sign in to comment.