Removing 'file' from _initial_builtins causes one unit test to fail
edreamleo opened this issue · 2 comments
edreamleo commented
'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 ================================
lieryan commented
file
used to be a builtin on Python 2, we should change the test to open
.