

def test_commit_history(self):
    ch = self.projectd_1.commit_history(branch='master')
    self.assertEqual(ch.shape[0], 12)
    ch2 = self.projectd_1.commit_history(branch='master', extensions=['py'])
    self.assertEqual(ch2.shape[0], 5)
    ch3 = self.projectd_1.commit_history(branch='master', limit=4)
    self.assertEqual(ch3.shape[0], 4)
    ch4 = self.projectd_1.commit_history(branch='master', days=5)
    self.assertEqual(ch4.shape[0], 12)
    fch = self.projectd_1.file_change_history(branch='master')
    self.assertEqual(fch.shape[0], 12)
    fch2 = self.projectd_1.file_change_history(branch='master', extensions=['py'])
    self.assertEqual(fch2.shape[0], 5)
    fch4 = self.projectd_1.file_change_history(branch='master', extensions=['js'])
    self.assertEqual(fch4.shape[0], 5)
    fch3 = self.projectd_1.file_change_history(branch='master', limit=4)
    self.assertEqual(fch3.shape[0], 4)
    fcr = self.projectd_1.file_change_rates(branch='master')
    self.assertEqual(fcr.shape[0], 12)
    self.assertEqual(fcr['unique_committers'].sum(), 12)
    self.assertEqual(fcr['net_change'].sum(), 17)
    coverages = self.projectd_1.has_coverage()['has_coverage'].values
    for coverage in coverages:
        self.assertFalse(coverage)
    bf = self.projectd_1.bus_factor(by='projectd')
    self.assertEqual(bf['bus factor'].values[0], 1)
    blame = self.projectd_1.blame(extensions=['py'])
    self.assertEqual(blame['loc'].sum(), 10)
    self.assertEqual(blame.shape[0], 1)
    cblame = self.projectd_1.cumulative_blame(by='committer')
    self.assertEqual(cblame.shape[0], 11)
    self.assertEqual(cblame[cblame.columns.values[0]].sum(), 117)
    revs = self.projectd_1.revs(num_datapoints=2)
    self.assertEqual(revs.shape[0], 2)
    revs = self.projectd_1.revs(limit=2)
    self.assertEqual(revs.shape[0], 2)
    revs = self.projectd_1.revs()
    self.assertEqual(revs.shape[0], 12)

dataset/ETHPy150Open wdm0006/git-pandas/tests/test_Project/test_properties.py TestLocalProperties.test_commit_history/original