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

WARNING: Failed to generate report: No data to report. #315

Closed
priamai opened this issue Oct 22, 2024 · 4 comments
Closed

WARNING: Failed to generate report: No data to report. #315

priamai opened this issue Oct 22, 2024 · 4 comments

Comments

@priamai
Copy link

priamai commented Oct 22, 2024

Hello,
when I run make test:

tests/test_apis.py::test_api_a_unauthorized FAILED                                                                      [  6%]/home/robomotic/DevOps/github/fastapi-nano/.venv/lib/python3.13/site-packages/coverage/inorout.py:505: CoverageWarning: Module src was never imported. (module-not-imported)
  self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/home/robomotic/DevOps/github/fastapi-nano/.venv/lib/python3.13/site-packages/coverage/control.py:892: CoverageWarning: No data was collected. (no-data-collected)
  self._warn("No data was collected.", slug="no-data-collected")
WARNING: Failed to generate report: No data to report.

can you explain what should be done to generate a proper coverage report?
How do we enable the data collection?

@rednafi
Copy link
Owner

rednafi commented Oct 23, 2024

Interesting, the make test command doesn’t have coverage anywhere. What command are you running to get this?

@rednafi
Copy link
Owner

rednafi commented Oct 23, 2024

Do you have uv installed and configured properly? The CI runs make test and it works without any error. So I couldn’t reproduce it.

@priamai
Copy link
Author

priamai commented Oct 23, 2024 via email

@rednafi
Copy link
Owner

rednafi commented Oct 25, 2024

I was able to reproduce it. This has been patched. Thanks for reporting.

#316

@rednafi rednafi closed this as completed Oct 25, 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

No branches or pull requests

2 participants