def test_commit_range_flipped(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')
result = osa_differ.validate_commit_range(path, 'HEAD', 'HEAD~1')
assert result == 'flip'
评论列表
文章目录