def test_get_mass_changes(self): """Retrieve mass changes easily.""" actual = cm.get_mass_changes(self.log, min_path=2) self.assertEqual(self.expected.query("revision == '1018'"), actual)
def test_get_mass_changes_on_indexed_log(self): """The function works when the input log is indexed.""" log = self.log.set_index(["revision", "path"]) actual = cm.get_mass_changes(log, min_path=2) self.assertEqual(self.expected.query("revision == '1018'"), actual)
def test_get_mass_changes_on_changes_per_path(self): """Retrieve mass changes using changes_per_path.""" actual = cm.get_mass_changes(self.log, max_changes_per_path=5.0) self.assertEqual(self.expected.query("revision == '1016'"), actual)
def test_get_no_mass_changes(self): """Handles case where no mass changes are found.""" actual = cm.get_mass_changes(self.log, min_path=100) self.assertEqual((0, 4), actual.shape)