From 9374a916588d9fe7169937ba262c86ad710cfa74 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 11 Oct 2009 16:49:05 +0200 Subject: converted all spaces to tabs ( 4 spaces = 1 tab ) just to allow me and my editor to work with the files properly. Can convert it back for releaes --- test/git/test_head.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'test/git/test_head.py') diff --git a/test/git/test_head.py b/test/git/test_head.py index e3408974..8338552f 100644 --- a/test/git/test_head.py +++ b/test/git/test_head.py @@ -8,25 +8,25 @@ from test.testlib import * from git import * class TestHead(object): - def setup(self): - self.repo = Repo(GIT_REPO) + def setup(self): + self.repo = Repo(GIT_REPO) - @patch_object(Git, '_call_process') - def test_repr(self, git): - git.return_value = fixture('for_each_ref') - - head = self.repo.heads[0] - - assert_equal('' % head.name, repr(head)) - - assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) + @patch_object(Git, '_call_process') + def test_repr(self, git): + git.return_value = fixture('for_each_ref') + + head = self.repo.heads[0] + + assert_equal('' % head.name, repr(head)) + + assert_true(git.called) + assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) - @patch_object(Git, '_call_process') - def test_ref_with_path_component(self, git): - git.return_value = fixture('for_each_ref_with_path_component') - head = self.repo.heads[0] + @patch_object(Git, '_call_process') + def test_ref_with_path_component(self, git): + git.return_value = fixture('for_each_ref_with_path_component') + head = self.repo.heads[0] - assert_equal('refactoring/feature1', head.name) - assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) + assert_equal('refactoring/feature1', head.name) + assert_true(git.called) + assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) -- cgit v1.2.1 From 9a119924bd314934158515a1a5f5877be63f6f91 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 11 Oct 2009 20:21:22 +0200 Subject: fixed issue in Ref.name implementation which would not handle components properly --- test/git/test_head.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'test/git/test_head.py') diff --git a/test/git/test_head.py b/test/git/test_head.py index 8338552f..b8380838 100644 --- a/test/git/test_head.py +++ b/test/git/test_head.py @@ -11,16 +11,11 @@ class TestHead(object): def setup(self): self.repo = Repo(GIT_REPO) - @patch_object(Git, '_call_process') - def test_repr(self, git): - git.return_value = fixture('for_each_ref') - - head = self.repo.heads[0] - - assert_equal('' % head.name, repr(head)) - - assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) + def test_base(self): + for head in self.repo.heads: + assert head.name + assert "refs/heads" in head.path + # END for each head @patch_object(Git, '_call_process') def test_ref_with_path_component(self, git): @@ -29,4 +24,3 @@ class TestHead(object): assert_equal('refactoring/feature1', head.name) assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) -- cgit v1.2.1