コード例 #1
0
ファイル: test_common.py プロジェクト: glyph/service_identity
 def test_negative(self):
     """
     If the list contains an object of the type, return False.
     """
     self.assertFalse(
         _contains_instance_of([object(), list(), {}], tuple)
     )
コード例 #2
0
ファイル: test_common.py プロジェクト: glyph/service_identity
 def test_positive(self):
     """
     If the list contains an object of the type, return True.
     """
     self.assertTrue(
         _contains_instance_of([object(), tuple(), object()], tuple)
     )
コード例 #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)
コード例 #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)
コード例 #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)