コード例 #1
0
ファイル: test_block.py プロジェクト: SantosJGND/Nlas
 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)
コード例 #2
0
ファイル: test_block.py プロジェクト: SantosJGND/Nlas
 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)
コード例 #3
0
ファイル: test_block.py プロジェクト: SantosJGND/Nlas
 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)
コード例 #4
0
ファイル: test_block.py プロジェクト: ElDeveloper/biolopy
 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)
コード例 #5
0
ファイル: test_block.py プロジェクト: ElDeveloper/biolopy
 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)
コード例 #6
0
ファイル: test_block.py プロジェクト: ElDeveloper/biolopy
 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)