diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/for_each_ref_with_path_component | bin | 72 -> 84 bytes | |||
-rw-r--r-- | test/git/test_head.py | 16 | ||||
-rw-r--r-- | test/git/test_tag.py | 2 | ||||
-rw-r--r-- | test/testlib/asserts.py | 4 |
4 files changed, 8 insertions, 14 deletions
diff --git a/test/fixtures/for_each_ref_with_path_component b/test/fixtures/for_each_ref_with_path_component Binary files differindex 717c4203..e723b4ae 100644 --- a/test/fixtures/for_each_ref_with_path_component +++ b/test/fixtures/for_each_ref_with_path_component 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('<git.Head "%s">' % 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)'})) diff --git a/test/git/test_tag.py b/test/git/test_tag.py index 52f7898c..fe3f78cc 100644 --- a/test/git/test_tag.py +++ b/test/git/test_tag.py @@ -18,7 +18,7 @@ class TestTag(object): tag_object_refs = list() for tag in self.repo.tags: assert "refs/tags" in tag.path - assert "/" not in tag.name + assert tag.name assert isinstance( tag.commit, Commit ) if tag.tag is not None: tag_object_refs.append( tag ) diff --git a/test/testlib/asserts.py b/test/testlib/asserts.py index 8f2acdc9..345f74ec 100644 --- a/test/testlib/asserts.py +++ b/test/testlib/asserts.py @@ -23,11 +23,11 @@ def assert_not_instance_of(expected, actual, msg=None): def assert_none(actual, msg=None): """verify that item is None""" - assert_equal(None, actual, msg) + assert actual is None, msg def assert_not_none(actual, msg=None): """verify that item is None""" - assert_not_equal(None, actual, msg) + assert actual is not None, msg def assert_match(pattern, string, msg=None): """verify that the pattern matches the string""" |