swev-id: pytest-dev__pytest-7982#42
swev-id: pytest-dev__pytest-7982#42casey-brooks wants to merge 1 commit intopytest-dev__pytest-7982from
Conversation
|
Test & Lint Summary
`tox -e linting` is not reachable here because pre-commit cannot fetch https://gitlab.com/pycqa/flake8 without credentials; the manual black/flake8 runs above cover the linted files. |
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for tackling the symlink regression and adding focused coverage. One issue remains: the new traversal logic now swallows every that arises from , which means permission errors or other unexpected filesystem failures get muted instead of surfacing. Please narrow that handler to the errno cases we actually expect (e.g. broken links, ELOOP) and let other errors propagate so we don’t hide real problems.
0525843 to
8345176
Compare
|
Retested after tightening the errno handling:
|
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for tightening up the exception handling—limiting it to the expected errno cases keeps traversal robust without muting real errors. The added regression tests exercise both direct invocation and parent directory traversal, so the original issue is covered. LGTM.
Summary
Testing
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/pytest repro/tests-> collected 0 itemsPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/pytest repro/tests-> 1 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/pytest testing/test_collection.py::test_collect_symlinked_directory_argument testing/test_collection.py::test_collect_symlinked_subdirectory.venv/bin/black --check src/_pytest/pathlib.py testing/test_collection.py.venv/bin/flake8 src/_pytest/pathlib.py testing/test_collection.pyFixes #41