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

Commit c237ada

Browse filesBrowse files
authored
refactor!(tests) skip_if_{vcs}_missing -> skip_if_missing_{vcs} (#473)
Extracted from #472.
2 parents 4cdd66e + 6787377 commit c237ada
Copy full SHA for c237ada

File tree

Expand file treeCollapse file tree

2 files changed

+17
-11
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-11
lines changed

‎CHANGES

Copy file name to clipboardExpand all lines: CHANGES
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ $ pip install --user --upgrade --pre libvcs
2222
Renamed `git_local_clone` to `example_git_repo` for better understandability in
2323
documentation / doctests.
2424

25+
#### pytest plugin: Rename `skip_if_{vcs}_missing` -> `skip_if_missing_{vcs}` (#473)
26+
27+
- `skip_if_git_missing` -> `skip_if_missing_git`
28+
- `skip_if_hg_missing` -> `skip_if_missing_hg`
29+
- `skip_if_svn_missing` -> `skip_if_missing_svn`
30+
2531
#### cmd: Listing method renamed (#466)
2632

2733
- `libvcs.cmd.git.GitCmd._list()` -> `libvcs.cmd.git.Git.ls()`

‎src/libvcs/pytest_plugin.py

Copy file name to clipboardExpand all lines: src/libvcs/pytest_plugin.py
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def __init__(self, attempts: int, *args: object) -> None:
3030
)
3131

3232

33-
skip_if_git_missing = pytest.mark.skipif(
33+
skip_if_missing_git = pytest.mark.skipif(
3434
not shutil.which("git"),
3535
reason="git is not available",
3636
)
37-
skip_if_svn_missing = pytest.mark.skipif(
37+
skip_if_missing_svn = pytest.mark.skipif(
3838
not shutil.which("svn"),
3939
reason="svn is not available",
4040
)
41-
skip_if_hg_missing = pytest.mark.skipif(
41+
skip_if_missing_hg = pytest.mark.skipif(
4242
not shutil.which("hg"),
4343
reason="hg is not available",
4444
)
@@ -109,7 +109,7 @@ def set_home(
109109

110110

111111
@pytest.fixture
112-
@skip_if_git_missing
112+
@skip_if_missing_git
113113
def gitconfig(user_path: pathlib.Path, set_home: pathlib.Path) -> pathlib.Path:
114114
"""Return git configuration, pytest fixture."""
115115
gitconfig = user_path / ".gitconfig"
@@ -144,7 +144,7 @@ def gitconfig(user_path: pathlib.Path, set_home: pathlib.Path) -> pathlib.Path:
144144

145145

146146
@pytest.fixture
147-
@skip_if_hg_missing
147+
@skip_if_missing_hg
148148
def hgconfig(user_path: pathlib.Path, set_home: pathlib.Path) -> pathlib.Path:
149149
"""Return Mercurial configuration, pytest fixture."""
150150
hgrc = user_path / ".hgrc"
@@ -256,7 +256,7 @@ def _create_git_remote_repo(
256256

257257

258258
@pytest.fixture
259-
@skip_if_git_missing
259+
@skip_if_missing_git
260260
def create_git_remote_repo(
261261
remote_repos_path: pathlib.Path,
262262
) -> CreateRepoPytestFixtureFn:
@@ -289,7 +289,7 @@ def git_remote_repo_single_commit_post_init(remote_repo_path: pathlib.Path) -> N
289289

290290

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

342342

343343
@pytest.fixture
344-
@skip_if_svn_missing
344+
@skip_if_missing_svn
345345
def create_svn_remote_repo(
346346
remote_repos_path: pathlib.Path,
347347
) -> CreateRepoPytestFixtureFn:
@@ -366,7 +366,7 @@ def fn(
366366

367367

368368
@pytest.fixture
369-
@skip_if_svn_missing
369+
@skip_if_missing_svn
370370
def svn_remote_repo(remote_repos_path: pathlib.Path) -> pathlib.Path:
371371
"""Pre-made. Local file:// based SVN server."""
372372
return _create_svn_remote_repo(
@@ -404,7 +404,7 @@ def hg_remote_repo_single_commit_post_init(remote_repo_path: pathlib.Path) -> No
404404

405405

406406
@pytest.fixture
407-
@skip_if_hg_missing
407+
@skip_if_missing_hg
408408
def create_hg_remote_repo(
409409
remote_repos_path: pathlib.Path,
410410
hgconfig: pathlib.Path,
@@ -431,7 +431,7 @@ def fn(
431431

432432

433433
@pytest.fixture
434-
@skip_if_hg_missing
434+
@skip_if_missing_hg
435435
def hg_remote_repo(
436436
remote_repos_path: pathlib.Path,
437437
hgconfig: pathlib.Path,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.