コード例 #1
0
ファイル: test_interval.py プロジェクト: sjanssen2/scikit-bio
 def test_assert_valid_bound(self):
     intvls = [(1, 2), (-1, 2)]
     for intvl in intvls:
         try:
             _assert_valid_bound(intvl)
         except TypeError:
             self.assertTrue(False)
コード例 #2
0
 def test_assert_valid_bound(self):
     intvls = [(1, 2), (-1, 2)]
     for intvl in intvls:
         try:
             _assert_valid_bound(intvl)
         except TypeError:
             self.assertTrue(False)
コード例 #3
0
ファイル: test_interval.py プロジェクト: sjanssen2/scikit-bio
 def test_assert_valid_bound_wrong_value(self):
     intvls = [(1, 2, 3), (2, 1), (True, 0), ('s', 'r')]
     for intvl in intvls:
         with self.assertRaises(ValueError):
             _assert_valid_bound(intvl)
コード例 #4
0
ファイル: test_interval.py プロジェクト: sjanssen2/scikit-bio
 def test_assert_valid_bound_wrong_type(self):
     intvls = [[1, 2], 1, [1, 2, 3]]
     for intvl in intvls:
         with self.assertRaises(TypeError):
             _assert_valid_bound(intvl)
コード例 #5
0
 def test_assert_valid_bound_wrong_value(self):
     intvls = [(1, 2, 3), (2, 1), (True, 0), ('s', 'r')]
     for intvl in intvls:
         with self.assertRaises(ValueError):
             _assert_valid_bound(intvl)
コード例 #6
0
 def test_assert_valid_bound_wrong_type(self):
     intvls = [[1, 2], 1, [1, 2, 3]]
     for intvl in intvls:
         with self.assertRaises(TypeError):
             _assert_valid_bound(intvl)