Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for #616: failing unit test after removing 'file' from rope.base.builtins #621

Merged
merged 6 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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