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

Fix duplicating paths during remapping #1755

Closed
wants to merge 1 commit into from

Conversation

BruDriguezz
Copy link

Adds tests for #1752's bugs, along with a patch. Closes the issue.

Copy link
Author

@BruDriguezz BruDriguezz left a comment

Choose a reason for hiding this comment

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

Have to check those out.

files2 = cov2.get_data().measured_files()

# The order of combining should not affect the resulting files.
assert set(files1) == set(files2)
Copy link
Author

Choose a reason for hiding this comment

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

In hindsight, this is pretty obvious; so that's a stupid check to take away.

[paths]
plugins =
plugins/
ci/girder/plugins/
Copy link
Author

Choose a reason for hiding this comment

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

This is weird; I didn't touch this, and these files remain on my local repository. Go figure, I'll check it out later.

@@ -489,6 +489,9 @@ def map(self, path: str, exists:Callable[[str], bool] = source_exists) -> str:

# If we get here, no pattern matched.

if self.relative:
Copy link
Owner

Choose a reason for hiding this comment

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

A key indication of whether the test is doing what it should: comment out "the fix" and see if the test fails. When I comment out these two lines, all the tests still pass.

@@ -500,18 +500,6 @@ def get_combined_filenames() -> set[str]:
filenames = {relative_filename(f).replace("\\", "/") for f in data.measured_files()}
return filenames

# Case 1: get the order right.
Copy link
Owner

Choose a reason for hiding this comment

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

I don't understand why you removed this test code.

@nedbat
Copy link
Owner

nedbat commented Mar 14, 2024

Thanks, I fixed it like this: 1b19799

@nedbat nedbat closed this Mar 14, 2024
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.

None yet

2 participants