Fix unit test failure with git >=1.6.0

This commit is contained in:
Tommi Virtanen 2009-09-16 22:28:17 -07:00
parent 73a0325204
commit 4b19d45a3b

View file

@ -63,7 +63,12 @@ def test_init_templates():
got = readFile(os.path.join(path, 'hooks', 'post-update'))
eq(got, '#!/bin/sh\n# i can override standard templates\n')
# standard templates are there, too
assert os.path.isfile(os.path.join(path, 'hooks', 'pre-rebase'))
assert (
# compatibility with git <1.6.0
os.path.isfile(os.path.join(path, 'hooks', 'pre-rebase'))
# for git >=1.6.0
or os.path.isfile(os.path.join(path, 'hooks', 'pre-rebase.sample'))
)
def test_init_environment():
tmp = maketemp()