def test_commit_range_not_valid(self, tmpdir):
"""Verify that we can test a commit range for validity."""
p = tmpdir.mkdir('test')
path = str(p)
repo = Repo.init(path)
file = p / 'test.txt'
file.write_text(u'Testing1', encoding='utf-8')
repo.index.add(['test.txt'])
repo.index.commit('Testing 1')
file.write_text(u'Testing2', encoding='utf-8')
repo.index.add(['test.txt'])
repo.index.commit('Testing 2')
with raises(Exception):
osa_differ.validate_commit_range(path, 'HEAD~2', 'HEAD')
评论列表
文章目录