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

Provide Distribution.origin reflecting content of direct_url.json. #465

Merged
merged 4 commits into from
Dec 3, 2023

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jul 30, 2023

Partial implementation of #404.

@makslevental
Copy link

Any blockers on this? Would be nice to have.

@jaraco jaraco closed this Dec 3, 2023
@jaraco jaraco reopened this Dec 3, 2023
@jaraco
Copy link
Member Author

jaraco commented Dec 3, 2023

diffcov is reporting this failure:

importlib_metadata/__init__.py (71.4%): Missing lines 632,635

@jaraco
Copy link
Member Author

jaraco commented Dec 3, 2023

That doesn't even make sense. One of those lines is blank and the other is the beginning of a docstring (executed unconditionally).

class DistributionFinder(MetaPathFinder):
"""

Wait, what? I did just rewrite two commits to remove the unintentionally added other files ("out.txt" and "before.mtree"), but I didn't touch __init__.py, and now the missed expectation is implicating different lines:

importlib_metadata/__init__.py (71.4%): Missing lines 625,628

At least those lines correspond to the lines changed in this diff :).

@jaraco
Copy link
Member Author

jaraco commented Dec 3, 2023

I don't understand how the lines aren't covered, given the test specifically exercises the .origin property.

@jaraco
Copy link
Member Author

jaraco commented Dec 3, 2023

Oh, maybe the issue is the test isn't derived from unittest.TestCase so isn't discovered.

@jaraco
Copy link
Member Author

jaraco commented Dec 3, 2023

Oh, maybe the issue is the test isn't derived from unittest.TestCase so isn't discovered.

Yep. That was it... and demonstrates that the test is not in fact capturing the expectation. Hooray for diffcov for catching an otherwise missed expectation.

@jaraco jaraco merged commit 537349c into main Dec 3, 2023
30 checks passed
@jaraco jaraco deleted the feature/origin branch December 3, 2023 17:24
@makslevental
Copy link

funny i don't remember what i wanted this for but thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants