Skip to content

Commit b5f79dc

Browse files
Merge pull request #320 from RonnyPfannschmidt/feature-git-worktree-193
basic test for git worktrees
2 parents 9466729 + 2683688 commit b5f79dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

testing/test_git.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ def test_git_dirty_notag(wd):
115115
assert today.strftime(".d%Y%m%d") in wd.version
116116

117117

118+
@pytest.mark.issue(193)
119+
def test_git_worktree_support(wd, tmpdir):
120+
wd.commit_testfile()
121+
worktree = tmpdir.join("work_tree")
122+
wd("git worktree add -b work-tree %s" % worktree)
123+
124+
res = do([sys.executable, "-m", "setuptools_scm", "ls"], cwd=worktree)
125+
assert str(worktree) in res
126+
127+
118128
@pytest.fixture
119129
def shallow_wd(wd, tmpdir):
120130
wd.commit_testfile()

0 commit comments

Comments
 (0)