test: replace SKIP_ONLINE_TESTS by requires_internet marker#615
Open
bdrung wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
==========================================
- Coverage 84.54% 79.15% -5.40%
==========================================
Files 104 104
Lines 21028 21020 -8
Branches 3219 3220 +1
==========================================
- Hits 17779 16639 -1140
- Misses 2809 3956 +1147
+ Partials 440 425 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a1842f7 to
d4a5c94
Compare
The branch coverage setting is specified in `pyproject.toml`. The out-of-tree `*-installed` tests do not have access to this config and therefore lack the branch coverage setting. So copy the `pyproject.toml` to the out-of-tree location as well. Fixes: a65d62e ("test: set branch code coverage in pyproject.toml")
Replace the use of `has_internet()` by a pytest marker, called `requires_internet`. All tests that require Internet access can now be easily skipped with `pytest -m 'not requires_internet'`.
Some tests lack the `requires_internet` marker: * `test_crashdb_launchpad` accesses Launchpad * apport-valgrind fetches debug packages from http://ddebs.ubuntu.com * `test_api_authentication` accesses github.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the use of
has_internet()by a pytest marker, calledrequires_internet. All tests that require Internet access can now be easily skipped withpytest -m 'not requires_internet'.This PR depends on #621.