Skip to content

Commit 350c43b

Browse files
committed
tests(conftest): Add svn_repo
1 parent d889659 commit 350c43b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

libvcs/conftest.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from libvcs._internal.run import run, which
1414
from libvcs.projects.git import GitProject, GitRemote
1515
from libvcs.projects.hg import MercurialProject
16+
from libvcs.projects.svn import SubversionProject
1617

1718
skip_if_git_missing = pytest.mark.skipif(
1819
not which("git"), reason="git is not available"
@@ -347,6 +348,19 @@ def hg_repo(
347348
return hg_repo
348349

349350

351+
@pytest.fixture
352+
def svn_repo(
353+
projects_path: pathlib.Path, svn_remote_repo: pathlib.Path
354+
) -> SubversionProject:
355+
"""Pre-made svn clone of remote repo checked out to user's projects dir."""
356+
svn_repo = SubversionProject(
357+
url=f"file://{svn_remote_repo}",
358+
dir=str(projects_path / "svn_repo"),
359+
)
360+
svn_repo.obtain()
361+
return svn_repo
362+
363+
350364
@pytest.fixture(autouse=True)
351365
def add_doctest_fixtures(
352366
doctest_namespace: dict[str, Any],

0 commit comments

Comments
 (0)