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

Report code coverage #36

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Report code coverage #36

wants to merge 5 commits into from

Conversation

ydirson
Copy link

@ydirson ydirson commented Jul 6, 2022

No description provided.

Signed-off-by: Yann Dirson <[email protected]>
While not necessary for the OS image in use for the test, it helps in
documenting the need for a non-default lib.

Signed-off-by: Yann Dirson <[email protected]>
Calling from toplevel provides more streamlined workflow (eg.
when locally running for coverage)

Signed-off-by: Yann Dirson <[email protected]>
We don't do anything with it yet, aside from displaying
the report

Signed-off-by: Yann Dirson <[email protected]>
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: pytest
run: |
cd tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the cd tests is no longer required?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, it is essentially useful to restrict test discovery, which can be done as well on pytest commandline (though this is not even necessary, there is just no other tests to be discovered in other dirs).
OTOH it requires a .coveragerc to be under tests/ as well, which means a dev has to use this cd tests in everyday life as well.

Copy link
Member

@Wescoeur Wescoeur Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cd tests is related to this issue: pytest-dev/pyfakefs#666
It's merged for several months, in theory we can remove this instruction if we use the latest version of pyfakefs.

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