@@ -722,7 +722,7 @@ def test_uuid(self):
722722
723723 opts = CodecOptions (uuid_representation = UuidRepresentation .STANDARD )
724724 transformed_id = decode (encode ({"id" : id }, codec_options = opts ), codec_options = opts )["id" ]
725- self .assertTrue ( isinstance ( transformed_id , uuid .UUID ) )
725+ self .assertIsInstance ( transformed_id , uuid .UUID )
726726 self .assertEqual (id , transformed_id )
727727 self .assertNotEqual (uuid .uuid4 (), transformed_id )
728728
@@ -731,7 +731,7 @@ def test_uuid_legacy(self):
731731 legacy = Binary .from_uuid (id , UuidRepresentation .PYTHON_LEGACY )
732732 self .assertEqual (3 , legacy .subtype )
733733 bin = decode (encode ({"uuid" : legacy }))["uuid" ]
734- self .assertTrue ( isinstance ( bin , Binary ) )
734+ self .assertIsInstance ( bin , Binary )
735735 transformed = bin .as_uuid (UuidRepresentation .PYTHON_LEGACY )
736736 self .assertEqual (id , transformed )
737737
@@ -787,7 +787,7 @@ def test_vector(self):
787787 try :
788788 Binary .from_vector ([x ], BinaryVectorDtype .PACKED_BIT )
789789 except Exception as exc :
790- self .assertTrue ( isinstance ( exc , struct .error ) )
790+ self .assertIsInstance ( exc , struct .error )
791791 else :
792792 self .fail ("Failed to raise an exception." )
793793
@@ -886,7 +886,7 @@ def test_utf8(self):
886886 y = {"hello" : iso8859_bytes }
887887 # Stored as BSON binary subtype 0.
888888 out = decode (encode (y ))
889- self .assertTrue ( isinstance ( out ["hello" ], bytes ) )
889+ self .assertIsInstance ( out ["hello" ], bytes )
890890 self .assertEqual (out ["hello" ], iso8859_bytes )
891891
892892 def test_null_character (self ):
0 commit comments