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

Removing 'file' from _initial_builtins causes one unit test to fail #616

Closed
edreamleo opened this issue Dec 17, 2022 · 2 comments
Closed
Labels
bug Unexpected or incorrect user-visible behavior
Milestone

Comments

@edreamleo
Copy link
Contributor

edreamleo commented Dec 17, 2022

'file' is not a Python3 builtin function, but removing 'file' from the _initial_builtins dict in builtins.py causes one unit test to fail:

`====================================================== FAILURES =======================================================
________________________________ CodeAssistTest.test_builtin_class_completion_proposal ________________________________

self = <ropetest.contrib.codeassisttest.CodeAssistTest testMethod=test_builtin_class_completion_proposal>

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

ropetest\contrib\codeassisttest.py:1159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest\contrib\codeassisttest.py:54: in assert_completion_in_result
    self.fail("completion <%s> not proposed" % name)
E   AssertionError: completion <file> not proposed
=============================================== short test summary info ===============================================
FAILED ropetest/contrib/codeassisttest.py::CodeAssistTest::test_builtin_class_completion_proposal - AssertionError: c...
=============================== 1 failed, 1941 passed, 21 skipped, 5 xfailed in 27.36s ================================
@edreamleo edreamleo added the bug Unexpected or incorrect user-visible behavior label Dec 17, 2022
@edreamleo edreamleo changed the title Removing 'file' from _initial_builtins causes one failed unit test Removing 'file' from _initial_builtins causes one unit test to fail Dec 17, 2022
@lieryan
Copy link
Member

lieryan commented Dec 19, 2022

file used to be a builtin on Python 2, we should change the test to open.

lieryan added a commit that referenced this issue Dec 22, 2022
PR for #616: failing unit test after removing 'file' from rope.base.builtins
@edreamleo
Copy link
Contributor Author

Closed via PR #621.

@lieryan lieryan added this to the 1.7.0 milestone Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected or incorrect user-visible behavior
Projects
None yet
Development

No branches or pull requests

2 participants