Skip to content

Commit 51a6c3a

Browse files
committed
test(sync[svn]) Add example for non-empty repo checkout
1 parent 77ea33c commit 51a6c3a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/sync/test_svn.py

+20
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,26 @@ def test_svn_sync(tmp_path: pathlib.Path, svn_remote_repo: pathlib.Path) -> None
3030
assert (tmp_path / repo_name).exists()
3131

3232

33+
def test_svn_sync_with_files(
34+
tmp_path: pathlib.Path, svn_remote_repo_with_files: pathlib.Path
35+
) -> None:
36+
"""Tests for SvnSync."""
37+
repo_name = "my_svn_project"
38+
39+
svn_repo = SvnSync(
40+
url=f"file://{svn_remote_repo_with_files}",
41+
path=str(tmp_path / repo_name),
42+
)
43+
44+
svn_repo.obtain()
45+
svn_repo.update_repo()
46+
47+
assert svn_repo.get_revision() == 0
48+
assert svn_repo.get_revision_file("./") == 3
49+
50+
assert (tmp_path / repo_name).exists()
51+
52+
3353
def test_repo_svn_remote_checkout(
3454
create_svn_remote_repo: CreateRepoPytestFixtureFn,
3555
tmp_path: pathlib.Path,

0 commit comments

Comments
 (0)