@@ -722,7 +722,7 @@ def test_uuid(self):
722
722
723
723
opts = CodecOptions (uuid_representation = UuidRepresentation .STANDARD )
724
724
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 )
726
726
self .assertEqual (id , transformed_id )
727
727
self .assertNotEqual (uuid .uuid4 (), transformed_id )
728
728
@@ -731,7 +731,7 @@ def test_uuid_legacy(self):
731
731
legacy = Binary .from_uuid (id , UuidRepresentation .PYTHON_LEGACY )
732
732
self .assertEqual (3 , legacy .subtype )
733
733
bin = decode (encode ({"uuid" : legacy }))["uuid" ]
734
- self .assertTrue ( isinstance ( bin , Binary ) )
734
+ self .assertIsInstance ( bin , Binary )
735
735
transformed = bin .as_uuid (UuidRepresentation .PYTHON_LEGACY )
736
736
self .assertEqual (id , transformed )
737
737
@@ -787,7 +787,7 @@ def test_vector(self):
787
787
try :
788
788
Binary .from_vector ([x ], BinaryVectorDtype .PACKED_BIT )
789
789
except Exception as exc :
790
- self .assertTrue ( isinstance ( exc , struct .error ) )
790
+ self .assertIsInstance ( exc , struct .error )
791
791
else :
792
792
self .fail ("Failed to raise an exception." )
793
793
@@ -886,7 +886,7 @@ def test_utf8(self):
886
886
y = {"hello" : iso8859_bytes }
887
887
# Stored as BSON binary subtype 0.
888
888
out = decode (encode (y ))
889
- self .assertTrue ( isinstance ( out ["hello" ], bytes ) )
889
+ self .assertIsInstance ( out ["hello" ], bytes )
890
890
self .assertEqual (out ["hello" ], iso8859_bytes )
891
891
892
892
def test_null_character (self ):
0 commit comments