UCL-ARC / UCL-ARC/python-tooling

Lots of red text when running `tox` on a fresh cookie.

未关闭
#560 2 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@samcunliffe 已经在做这个了。

开始于 2025年7月15日。

bug
主要语言
Python
星标
62
派生
10
平均合并
7 天 6 小时
30 天内合并 PR
6

描述

Describe the Bug

During the workshop we ran tox on a demo package. There were a lot of errors possibly related to coverage?

To Reproduce

Cookiecut a fresh cookie.

uv venv
source .venv/bin/activate
uv pip install -e ".[dev,test]"
which tox
tox
Expected Behaviour

tox should run tests in all supported Python versions with nice comforting green text. And no red text.

Actual Behaviour
/Users/scnlf/projects/example-cookie/.tox/py311/lib/python3.11/site-packages/coverage/inorout.py:509: CoverageWarning: Module example-cookie was never imported. (module-not-imported)
  self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/Users/scnlf/projects/example-cookie/.tox/py311/lib/python3.11/site-packages/coverage/control.py:915: CoverageWarning: No data was collected. (no-data-collected)
  self._warn("No data was collected.", slug="no-data-collected")
tests/test_dummy.py::test_stupid_example PASSED                                                                            [100%]
WARNING: Failed to generate report: No data to report.

/Users/scnlf/projects/example-cookie/.tox/py311/lib/python3.11/site-packages/pytest_cov/plugin.py:358: CovReportWarning: Failed to generate report: No data to report.

  warnings.warn(CovReportWarning(message), stacklevel=1)


========================================================= tests coverage =========================================================
_______________________________________ coverage: platform darwin, python 3.11.12-final-0 ________________________________________

======================================================= 1 passed in 0.02s ========================================================
py311: OK ✔ in 9.54 seconds
py312: install_package_deps> python -I -m pip install pytest pytest-cov
py312: install_package> python -I -m pip install --force-reinstall --no-deps /Users/scnlf/projects/example-cookie/.tox/.tmp/package/4/example-cookie-0.1.dev0.tar.gz
py312: commands[0]> pytest --cov --cov-report=xml
Version In Use

Current latest tag.

Additional Context
- Cookiecutter version:
- Operating system: macOS
- Python version: all!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。