From 4b19d45a3b482049efa2cee52d42fcccecc67926 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 16 Sep 2009 22:28:17 -0700 Subject: Fix unit test failure with git >=1.6.0 --- gitosis/test/test_repository.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gitosis/test/test_repository.py b/gitosis/test/test_repository.py index 6ce4129..14c6764 100644 --- a/gitosis/test/test_repository.py +++ b/gitosis/test/test_repository.py @@ -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() -- cgit v1.2.3-18-g5258