We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/PyCQA/pylint/blob/main/tests/lint/unittest_lint.py#L638
try: pylintd = join(tempfile.gettempdir(), ".pylint.d") os.environ["PYLINTHOME"] = pylintd try: reload(config) assert config.PYLINT_HOME == pylintd finally: try: > os.remove(pylintd) except FileNotFoundError: pass finally: del os.environ["PYLINTHOME"]
This test fails with IsADirectoryError, because pylintd is a directory. It can be fixed by replacing os.remove with rmtree.
pytest -k test_pylint_home
_______________________________ test_pylint_home _______________________________ @pytest.mark.usefixtures("pop_pylintrc") def test_pylint_home(): uhome = os.path.expanduser("~") if uhome == "~": expected = ".pylint.d" else: expected = os.path.join(uhome, ".pylint.d") assert config.PYLINT_HOME == expected try: pylintd = join(tempfile.gettempdir(), ".pylint.d") os.environ["PYLINTHOME"] = pylintd try: reload(config) assert config.PYLINT_HOME == pylintd finally: try: > os.remove(pylintd) E IsADirectoryError: [Errno 21] Is a directory: '/tmp/.pylint.d' tests/lint/unittest_lint.py:645: IsADirectoryError
tests pass
pylint 2.9.6 astroid 2.6.5 Python 3.9.6 (default, Jul 6 2021, 18:29:50) [GCC 10.2.1 20201203]
Void Linux
The text was updated successfully, but these errors were encountered:
Thank you for the report @paper42 , would you like to contribute the fix as you already analyzed the problem ? :)
Sorry, something went wrong.
sure, #4781
Successfully merging a pull request may close this issue.
Bug description
https://github.com/PyCQA/pylint/blob/main/tests/lint/unittest_lint.py#L638
This test fails with IsADirectoryError, because pylintd is a directory. It can be fixed by replacing os.remove with rmtree.
Command used
Pylint output
Expected behavior
tests pass
Pylint version
OS / Environment
Void Linux
The text was updated successfully, but these errors were encountered: