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

pytest coverage #48

Merged
merged 3 commits into from
Jul 13, 2023
Merged

pytest coverage #48

merged 3 commits into from
Jul 13, 2023

Conversation

bpoumarede
Copy link
Contributor

No description provided.

@bpoumarede bpoumarede force-pushed the bp/pytest-coverage branch 14 times, most recently from ca66719 to a7f7e2b Compare June 23, 2023 06:27
command += [
"--cov-report",
f"{self.coverage.get()}:{str(self.project.build_directory / coverage_file)}",
f"--cov={str(self.project.directory / tests_dir)}",
Copy link
Contributor

Choose a reason for hiding this comment

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

The --cov option needs to point to the source directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I will change that

@bpoumarede bpoumarede force-pushed the bp/pytest-coverage branch 7 times, most recently from ce2660e to 4cb2751 Compare June 27, 2023 15:36
@bpoumarede bpoumarede force-pushed the bp/pytest-coverage branch 2 times, most recently from 9998f72 to 009ad3b Compare July 10, 2023 15:40
@bpoumarede bpoumarede force-pushed the bp/pytest-coverage branch 2 times, most recently from 4d931b8 to dba3397 Compare July 11, 2023 08:25
Copy link
Contributor

@NiklasRosenstein NiklasRosenstein left a comment

Choose a reason for hiding this comment

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

We may want to consider also testing that the coverage report contains what it should contain, but I'm happy to merge it in its current state to unblock downstream work.

@NiklasRosenstein NiklasRosenstein merged commit 8bd2f97 into develop Jul 13, 2023
12 of 13 checks passed
@NiklasRosenstein NiklasRosenstein deleted the bp/pytest-coverage branch July 13, 2023 07:57
Comment on lines +61 to +65
command += [
"--cov-report",
f"{self.coverage.get().get_format()}:{str(self.project.build_directory / coverage_file)}",
f"--cov={str(self.project.directory / self.settings.source_directory)}",
]

Choose a reason for hiding this comment

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

Should there be a check to see if pytest-cov is installed before adding these parameters?

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.

None yet

3 participants