

def test_log_with_paths(self):
    vcs = self.get_vcs()
    self._set_author('Another Committer', 'ac@d.not.zm.exist')
    self._add_file('BAZ', self.remote_path, commit_msg='bazzy')
    vcs.clone()
    vcs.update()
    revisions = list(vcs.log())
    assert (len(revisions) == 3)
    revisions = list(vcs.log(paths=['BAZ']))
    assert (len(revisions) == 1), ('one path, len ' + len(revisions))
    self.assertRevision(revisions[0], message='bazzy')
    revisions = list(vcs.log(paths=['FOO', 'BAZ']))
    assert (len(revisions) == 2), ('two paths without wildcard, len ' + len(revisions))
    revisions = list(vcs.log(paths=['FO*', 'BAZ']))
    assert (len(revisions) == 2), ('two paths with wildcards, len ' + len(revisions))
    self.assertRevision(revisions[0], message='bazzy')
    self.assertRevision(revisions[1], message='test\nlol\n')

dataset/ETHPy150Open dropbox/changes/tests/changes/vcs/test_git.py GitVcsTest.test_log_with_paths/original