def test_pairs_to_compute_rids_overlap_cids(self): rids = np.array([0, 1, 2]) cids = np.array([0, 10, 20]) with self.assertRaises(ValueError): _pairs_to_compute(rids, cids)
def test_pairs_to_compute_rids_are_not_cids(self): rids = np.array([0, 1, 2]) cids = np.array([3, 4, 5]) exp = [(0, 3), (0, 4), (0, 5), (1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5)] self.assertEqual(_pairs_to_compute(rids, cids), exp)
def test_pairs_to_compute_rids_are_cids(self): rids = np.array([0, 1, 2, 10]) cids = rids exp = [(0, 1), (0, 2), (0, 10), (1, 2), (1, 10), (2, 10)] self.assertEqual(_pairs_to_compute(rids, cids), exp)