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

⚡ Remove --cov from pytest.ini_options #3522

Merged

Conversation

ff137
Copy link
Contributor

@ff137 ff137 commented Feb 13, 2025

Developer experience improvement:
Speeds up local test runs, especially when only wanting to run a few tests at a time


Previously, running a single unit test took me 7.5 seconds, and now it takes 0.5 seconds.

This is because it takes ~7 seconds to generate the coverage report (in terminal and xml file) for the whole acapy_agent folder, and the pyproject.toml ([tool.pytest.ini_options]) configures that all pytest commands include a coverage request.

This is hugely unnecessary to be forced on the developer every time they type pytest

If a developer wants to see a coverage report, they can add --cov at the end.


Impact: running tests locally are faster, and a developer will have to now type --cov if they ever want to see a coverage report.

Also, test output is more readable now, since it won't always include 100s of lines of coverage info.

No modification necessary for the github workflows, since they manually specify to run with --cov

@ff137 ff137 self-assigned this Feb 13, 2025
@swcurran
Copy link
Contributor

This is for developers to weigh in on, but makes total sense to me! Nice!

pyproject.toml Outdated Show resolved Hide resolved
@ff137 ff137 force-pushed the remove-cov-from-pytest-config branch from 42e4d9a to a6b5953 Compare February 13, 2025 17:00
@ff137 ff137 force-pushed the remove-cov-from-pytest-config branch from a6b5953 to 253860b Compare February 13, 2025 17:01
@jamshale jamshale enabled auto-merge (squash) February 13, 2025 17:14
@jamshale jamshale merged commit 7a795d1 into openwallet-foundation:main Feb 13, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants