Changeset - 56e456117510
[Not reviewed]
default
0 1 0
Manuel Jacob - 7 years ago 2019-02-18 23:55:07
me@manueljacob.de
hg: add tests for `successors` and `predecessors` properties of MercurialChangeset

They are marked as xfail because the current implementation fails on new versions of Mercurial because a function and an attribute were renamed.
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/vcs/test_hg.py
Show inline comments
 
@@ -563,24 +563,34 @@ class TestMercurialChangeset(object):
 
        pass
 

	
 
    def test_archival_as_generator(self):
 
        # TODO:
 
        pass
 

	
 
    def test_archival_wrong_kind(self):
 
        tip = self.repo.get_changeset()
 
        with pytest.raises(VCSError):
 
            tip.fill_archive(kind='error')
 

	
 
    def test_archival_empty_prefix(self):
 
        # TODO:
 
        pass
 

	
 
    def test_author_email(self):
 
        assert 'marcin@python-blog.com' == self.repo.get_changeset('b986218ba1c9').author_email
 
        assert 'lukasz.balcerzak@python-center.pl' == self.repo.get_changeset('3803844fdbd3').author_email
 
        assert '' == self.repo.get_changeset('84478366594b').author_email
 

	
 
    def test_author_username(self):
 
        assert 'Marcin Kuzminski' == self.repo.get_changeset('b986218ba1c9').author_name
 
        assert 'Lukasz Balcerzak' == self.repo.get_changeset('3803844fdbd3').author_name
 
        assert 'marcink' == self.repo.get_changeset('84478366594b').author_name
 

	
 
    @pytest.mark.xfail
 
    def test_successors(self):
 
        init_chset = self.repo.get_changeset(0)
 
        assert init_chset.successors == []
 

	
 
    @pytest.mark.xfail
 
    def test_predecessors(self):
 
        init_chset = self.repo.get_changeset(0)
 
        assert init_chset.predecessors == set([])
0 comments (0 inline, 0 general)