libvcs
libvcs copied to clipboard
Issue: `mercurial` / `svn` missing skips git tests
Problem
If svn (subversion) or hg (mercurial) isn't installed, fixtures for git-based tests won't run.
Summary by Sourcery
Tests:
- Skip tests for Mercurial, Subversion, and Git if the corresponding VCS command is not available.
Codecov Report
Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
Project coverage is 54.01%. Comparing base (
5ded894) to head (fb20670).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/libvcs/pytest_plugin.py | 40.00% | 1 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #482 +/- ##
==========================================
- Coverage 54.08% 54.01% -0.07%
==========================================
Files 40 40
Lines 3635 3634 -1
Branches 793 794 +1
==========================================
- Hits 1966 1963 -3
- Misses 1318 1319 +1
- Partials 351 352 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@sourcery-ai review
Reviewer's Guide by Sourcery
This pull request fixes an issue where tests were skipped if certain VCS binaries were missing, but the tests didn't rely on those binaries. The logic was unintentionally skipping tests that should have run. The fix now correctly skips tests only when the required VCS binary is missing.
No diagrams generated as the changes look simple and do not need a visual representation.
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Tests are now correctly skipped only when a required VCS binary is missing. Previously, tests were skipped if any of svn, git, or hg were missing, regardless of whether the test used them. |
|
src/libvcs/pytest_plugin.py |
| Removed an unnecessary fixture that set the Mercurial configuration. |
|
tests/sync/test_hg.py |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it.
- Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted.
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.