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

Code coverage baked into setup.cfg breaks Gentoo Portage builds/testing #5242

Open
Kangie opened this issue May 13, 2024 · 0 comments
Open

Comments

@Kangie
Copy link

Kangie commented May 13, 2024

Problem

Code coverage baked into setup.cfg/pytest in 8b4983f
results in Gentoo's portage builds being unable to initialise tests as Gentoo pytest configuration disables code coverage due to irrelevance to our use case.

>>> Test phase: media-sound/beets-9999
python3.12 -m pytest -vv -ra -l -Wdefault -Werror::pytest.PytestUnhandledCoroutineWarning --color=yes -o console_output_style=count -o tmp_path_retention_count=0 -o tmp_path_retention_policy=failed -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:pytest-describe -p no:plus -p no:tavern -p no:salt-factories
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --cov=beets --cov=beetsplug --cov-report=xml:.reports/coverage.xml --cov-report=html:.reports/html --cov-branch --cov-context=test
  inifile: /var/tmp/portage/media-sound/beets-9999/work/beets-9999/setup.cfg
  rootdir: /var/tmp/portage/media-sound/beets-9999/work/beets-9999

I can work around this by seding out the pytest options, but there's probably a better way to resolve this permanently.

sed -i -e "/--cov=beets/,+9d" setup.cfg

Setup

  • OS: Gentoo Linux
  • Python version: 3.12
  • beets version: master
  • Turning off plugins made problem go away (yes/no): N/A
@Kangie Kangie changed the title Code coverage baied into setup.cfg breaks Gentoo Portage builds/testing Code coverage baked into setup.cfg breaks Gentoo Portage builds/testing May 26, 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

1 participant