cbdq-io / testinfra-bdd

An interface between pytest-bdd and pytest-testinfra.
https://pypi.org/project/testinfra-bdd/
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Increase Code Coverage to 100% #40

Closed dallinb closed 2 years ago

dallinb commented 2 years ago

We're close in the code coverage, but we can improve.

dallinb commented 2 years ago

This is not possible for the tests running in GitHub Actions as we have to skip tests that rely on ICMP (disabled in GitHub/Azure). When running locally, we do achieve 100% coverage, but when skipping the tests due to GitHub, that drops to 95.54% (see https://github.com/locp/testinfra-bdd/runs/7423026358?check_suite_focus=true) what we can do is look at dynamically setting the expected value depending on if running locally or via a GitHub action.

To emulate the tests and coverage for GitHub locally, run the following command:

GITHUB_ACTIONS=true make test