示例#1
0
 def test_prepare_positions_start_too_high2(self):
     with self.assertRaisesRegex(ValueError,
                                 'Start.*should be smaller.*alignment'):
         _prepare_positions(22, None, 20)
示例#2
0
 def test_prepare_positions_start_too_high1(self):
     with self.assertRaisesRegex(ValueError,
                                 'Start.*should be smaller.*end position'):
         _prepare_positions(18, 10, 20)
示例#3
0
 def test_prepare_positions_end_too_high(self):
     pos_start, pos_end, aln_len = 4, 24, 20
     obs_pos = _prepare_positions(pos_start, pos_end, aln_len)
     exp_pos = {"start": 3, "end": 20}
     self.assertDictEqual(obs_pos, exp_pos)
示例#4
0
 def test_prepare_positions_both_none(self):
     with self.assertRaisesRegex(
             ValueError, 'Neither primers nor.*positions were provided'):
         _prepare_positions(None, None, 20)
示例#5
0
 def test_prepare_positions_no_end(self):
     pos_start, pos_end, aln_len = 4, None, 20
     obs_pos = _prepare_positions(pos_start, pos_end, aln_len)
     exp_pos = {"start": 3, "end": None}
     self.assertDictEqual(obs_pos, exp_pos)