Esempio n. 1
0
 def test_negative(self):
     """
     If the list contains an object of the type, return False.
     """
     self.assertFalse(
         _contains_instance_of([object(), list(), {}], tuple)
     )
Esempio n. 2
0
 def test_positive(self):
     """
     If the list contains an object of the type, return True.
     """
     self.assertTrue(
         _contains_instance_of([object(), tuple(), object()], tuple)
     )
Esempio n. 3
0
 def test_negative(self):
     """
     If the list does not contain an object of the type, return False.
     """
     assert not _contains_instance_of([object(), list(), {}], tuple)
Esempio n. 4
0
 def test_positive(self):
     """
     If the list contains an object of the type, return True.
     """
     assert _contains_instance_of([object(), tuple(), object()], tuple)
Esempio n. 5
0
 def test_negative(self):
     """
     If the list does not contain an object of the type, return False.
     """
     assert not _contains_instance_of([object(), list(), {}], tuple)