Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

refactor!(tests) skip_if_{vcs}_missing -> skip_if_missing_{vcs} #473

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

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ $ pip install --user --upgrade --pre libvcs
Renamed `git_local_clone` to `example_git_repo` for better understandability in
documentation / doctests.

#### pytest plugin: Rename `skip_if_{vcs}_missing` -> `skip_if_missing_{vcs}` (#473)

- `skip_if_git_missing` -> `skip_if_missing_git`
- `skip_if_hg_missing` -> `skip_if_missing_hg`
- `skip_if_svn_missing` -> `skip_if_missing_svn`

#### cmd: Listing method renamed (#466)

- `libvcs.cmd.git.GitCmd._list()` -> `libvcs.cmd.git.Git.ls()`
Expand Down
22 changes: 11 additions & 11 deletions 22 src/libvcs/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def __init__(self, attempts: int, *args: object) -> None:
)


skip_if_git_missing = pytest.mark.skipif(
skip_if_missing_git = pytest.mark.skipif(
not shutil.which("git"),
reason="git is not available",
)
skip_if_svn_missing = pytest.mark.skipif(
skip_if_missing_svn = pytest.mark.skipif(
not shutil.which("svn"),
reason="svn is not available",
)
skip_if_hg_missing = pytest.mark.skipif(
skip_if_missing_hg = pytest.mark.skipif(
not shutil.which("hg"),
reason="hg is not available",
)
Expand Down Expand Up @@ -109,7 +109,7 @@ def set_home(


@pytest.fixture
@skip_if_git_missing
@skip_if_missing_git
def gitconfig(user_path: pathlib.Path, set_home: pathlib.Path) -> pathlib.Path:
"""Return git configuration, pytest fixture."""
gitconfig = user_path / ".gitconfig"
Expand Down Expand Up @@ -144,7 +144,7 @@ def gitconfig(user_path: pathlib.Path, set_home: pathlib.Path) -> pathlib.Path:


@pytest.fixture
@skip_if_hg_missing
@skip_if_missing_hg
def hgconfig(user_path: pathlib.Path, set_home: pathlib.Path) -> pathlib.Path:
"""Return Mercurial configuration, pytest fixture."""
hgrc = user_path / ".hgrc"
Expand Down Expand Up @@ -256,7 +256,7 @@ def _create_git_remote_repo(


@pytest.fixture
@skip_if_git_missing
@skip_if_missing_git
def create_git_remote_repo(
remote_repos_path: pathlib.Path,
) -> CreateRepoPytestFixtureFn:
Expand Down Expand Up @@ -289,7 +289,7 @@ def git_remote_repo_single_commit_post_init(remote_repo_path: pathlib.Path) -> N


@pytest.fixture
@skip_if_git_missing
@skip_if_missing_git
def git_remote_repo(remote_repos_path: pathlib.Path) -> pathlib.Path:
"""Pre-made git repo w/ 1 commit, used as a file:// remote to clone and push to."""
return _create_git_remote_repo(
Expand Down Expand Up @@ -341,7 +341,7 @@ def svn_remote_repo_single_commit_post_init(remote_repo_path: pathlib.Path) -> N


@pytest.fixture
@skip_if_svn_missing
@skip_if_missing_svn
def create_svn_remote_repo(
remote_repos_path: pathlib.Path,
) -> CreateRepoPytestFixtureFn:
Expand All @@ -366,7 +366,7 @@ def fn(


@pytest.fixture
@skip_if_svn_missing
@skip_if_missing_svn
def svn_remote_repo(remote_repos_path: pathlib.Path) -> pathlib.Path:
"""Pre-made. Local file:// based SVN server."""
return _create_svn_remote_repo(
Expand Down Expand Up @@ -404,7 +404,7 @@ def hg_remote_repo_single_commit_post_init(remote_repo_path: pathlib.Path) -> No


@pytest.fixture
@skip_if_hg_missing
@skip_if_missing_hg
def create_hg_remote_repo(
remote_repos_path: pathlib.Path,
hgconfig: pathlib.Path,
Expand All @@ -431,7 +431,7 @@ def fn(


@pytest.fixture
@skip_if_hg_missing
@skip_if_missing_hg
def hg_remote_repo(
remote_repos_path: pathlib.Path,
hgconfig: pathlib.Path,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.