示例#1
0
 def test_assert_valid_fuzzy(self):
     fuzzy = [(True, False), (True, True)]
     for fuzzy in fuzzy:
         try:
             _assert_valid_fuzzy(fuzzy)
         except Exception:
             self.assertTrue(False)
示例#2
0
 def test_assert_valid_fuzzy(self):
     fuzzy = [(True, False), (True, True)]
     for fuzzy in fuzzy:
         try:
             _assert_valid_fuzzy(fuzzy)
         except:
             self.assertTrue(False)
示例#3
0
 def test_assert_valid_fuzzy_wrong_type(self):
     fuzzy = [[True, False], 's', 1, (0, 1), ('s', '')]
     for fuzzy in fuzzy:
         with self.assertRaises(TypeError):
             _assert_valid_fuzzy(fuzzy)
示例#4
0
 def test_assert_valid_fuzzy_wrong_value(self):
     fuzzy = [(True, False, True), ()]
     for fuzzy in fuzzy:
         with self.assertRaises(ValueError):
             _assert_valid_fuzzy(fuzzy)
示例#5
0
 def test_assert_valid_fuzzy_wrong_type(self):
     fuzzy = [[True, False], 's', 1, (0, 1), ('s', '')]
     for fuzzy in fuzzy:
         with self.assertRaises(TypeError):
             _assert_valid_fuzzy(fuzzy)
示例#6
0
 def test_assert_valid_fuzzy_wrong_value(self):
     fuzzy = [(True, False, True), ()]
     for fuzzy in fuzzy:
         with self.assertRaises(ValueError):
             _assert_valid_fuzzy(fuzzy)