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: Source paths with trailing slashes causing inconsistent sources in XML report with relative_paths #1608

Merged
merged 2 commits into from
Apr 27, 2023

Commits on Apr 27, 2023

  1. Added failing test for source with trailing slash

    This test is nearly identical to the one above it, with the only
    change being the source that is used. This may end up turning into
    a fixture instead if the tests end up being identical after the
    fix is made.
    kevin-brown authored and nedbat committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    2b42932 View commit details
    Browse the repository at this point in the history
  2. Strip trailing slash for relative source paths

    This fixes an issue introduced in 45cf793
    where using `relative_files=True` and `src` with a trailing slash,
    the source inserted as `<sources>` in the XML report would also have
    a trailing slash. This also fixes an issue introduced in the same
    commit where an empty `<source>` would be inserted as well for cases
    where the `src` has a trailing slash.
    kevin-brown authored and nedbat committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    4104428 View commit details
    Browse the repository at this point in the history