Exemplo n.º 1
0
    def show_bug_catchers(self):
        #populate list of bugs
        self._buglist.read_bug_list(self._bugid_file)

        #populate list of changesets
        self._repo = RepoFactory.get_repo(self._repodir)
        self._repo.get_full_changesetlist(self._startdate, self._changesets)

        #match bugs with the changesets that fix them
        self._match_bugs_with_changesets()

        #forget changesets which do not fix a bug
        self._changesets.remove_changesets_which_do_not_fix_a_bug()

        #populate list of files which were modified when fixing bugs
        self._build_buggy_file_list()

        #sort files by bugginess and output results
        results = self._get_buggy_files_sorted_by_bugginess()
        print self._get_output(results)
Exemplo n.º 2
0
 def test_get_repo_returns_mercurial_repo(self):
     os.mkdir(os.path.join(self.directory, '.hg'))
     repo = RepoFactory.get_repo(self.directory)
     self.assertEquals(MercurialRepo, type(repo))
Exemplo n.º 3
0
 def test_get_repo_fails_when_non_supported_repo(self):
     os.mkdir(os.path.join(self.directory, '.dne'))
     with self.assertRaises(RepositoryNotFoundException):
         RepoFactory.get_repo(self.directory)
Exemplo n.º 4
0
 def test_get_repo_fails_when_directory_is_not_present(self):
     non_existant_dir = os.path.join(self.directory, 'dne')
     with self.assertRaises(RepositoryNotFoundException):
         RepoFactory.get_repo(non_existant_dir)