-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
cannot create an xml report #1709
Comments
copied the |
It looks like you have two different files which are reported at the same location. For example, two files both known as |
No, sorry, you have files with numbers in their names, and some have leading zeros, like two files: x1y.py and x01y.py, is that correct? |
Fixed in commit be28121 |
yes, we have a lot of files like |
just tested locally with the could I ask to create a trigger patch release with this fix in it? thank you |
There will be a release soon. |
This is now released as part of coverage 7.3.3. |
@nedbat thank you very much 🍰 |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [coverage](https://togithub.com/nedbat/coveragepy) | `==7.3.2` -> `==7.3.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>nedbat/coveragepy (coverage)</summary> ### [`v7.3.3`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-733--2023-12-14) [Compare Source](https://togithub.com/nedbat/coveragepy/compare/7.3.2...7.3.3) - Fix: function definitions with multi-line signatures can now be excluded by matching any of the lines, closing `issue 684`*. Thanks, `Jan Rusak, Maciej Kowalczyk and Joanna Ejzel <pull 1705_>`*. - Fix: XML reports could fail with a TypeError if files had numeric components that were duplicates except for leading zeroes, like `file1.py` and `file001.py`. Fixes `issue 1709`\_. - The `coverage annotate` command used to announce that it would be removed in a future version. Enough people got in touch to say that they use it, so it will stay. Don't expect it to keep up with other new features though. - Added new :ref:`debug options <cmd_run_debug>`: - `pytest` writes the pytest test name into the debug output. - `dataop2` writes the full data being added to CoverageData objects. .. \_issue 684:[https://github.com/nedbat/coveragepy/issues/684](https://togithub.com/nedbat/coveragepy/issues/684)4 .. \_pull 1705[https://github.com/nedbat/coveragepy/pull/1705](https://togithub.com/nedbat/coveragepy/pull/1705)05 .. \_issue 170[https://github.com/nedbat/coveragepy/issues/1709](https://togithub.com/nedbat/coveragepy/issues/1709)709 .. \_changes\_7-3-2: </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy45My4xIiwidXBkYXRlZEluVmVyIjoiMzcuOTMuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Describe the bug
I create the coverage of some tests by calling the coverage API according to the documentation, then
pytest.main(...
etc according to the documentationThe html report works perfectly, the stdout terminal also works...
the xml_report crashes, then tried the terminal way:
coverage xml -o coverage.xml
to convert the existing .coverage file to xml, same issue as with the function xml_report:To Reproduce
How can we reproduce the problem? Please be specific. Don't link to a failing CI job. Answer the questions below:
3.11.6
coverage debug sys
is helpful.pip freeze
is helpful.its clients code, that I can't share
Expected behavior
the coverage.xml file exists, no errors
The text was updated successfully, but these errors were encountered: