Skip to content
New issue

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

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

Already on GitHub? # to your account

🧪 Add a test for implicit ns src root lookup #10171

Conversation

webknjaz
Copy link
Contributor

@webknjaz webknjaz commented Jan 8, 2025

This patch modifies the test_discover_package_path_source_root_as_* tests to also run against directory layouts with no exlicitly existing __init__.py file.

They were added in #10036 and seem to be insufficient, not covering PEP 420 implicit namespaces.

Type of Changes

Type
🧪 Tests

Description

I haven't found a pre-existing issue so far. It should be possible to mark these tests with xfail and merge them before working on the actual fix.

This patch modifies the `test_discover_package_path_source_root_as_*`
tests to also run against directory layouts with no exlicitly existing
`__init__.py` file.

They were added in pylint-dev#10036 and seem to be insufficient, not covering
PEP 420 implicit namespaces.
@webknjaz webknjaz requested a review from DudeNr33 as a code owner January 8, 2025 17:35
@webknjaz
Copy link
Contributor Author

webknjaz commented Jan 8, 2025

@DanielNoord @Pierre-Sassoulas it's not failing where I thought it would.. But perhaps it's still worth merging. WDYT?

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.83%. Comparing base (6456374) to head (d0fb075).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10171   +/-   ##
=======================================
  Coverage   95.83%   95.83%           
=======================================
  Files         174      174           
  Lines       18995    18995           
=======================================
  Hits        18204    18204           
  Misses        791      791           

@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry labels Jan 8, 2025
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah LGTM !

@Pierre-Sassoulas Pierre-Sassoulas merged commit 14b242f into pylint-dev:main Jan 8, 2025
29 of 30 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants