def get_modified_filenames(): """Return a set with the filename of the modified files.""" vcs, unused_root = gitlint.get_vcs_root() if not vcs: return None return set(vcs.modified_filenames().iterkeys())
def test_get_vcs_none(self): self.git_repository_root.return_value = None self.hg_repository_root.return_value = None self.assertEquals((None, None), gitlint.get_vcs_root())
def test_get_vcs_hg(self): self.git_repository_root.return_value = None self.hg_repository_root.return_value = self.root self.assertEquals((gitlint.hg, self.root), gitlint.get_vcs_root())
def test_get_vcs_git(self): self.git_repository_root.return_value = self.root self.assertEqual((gitlint.git, self.root), gitlint.get_vcs_root())