2828
2929sys .path [0 :0 ] = ["" ]
3030
31- from test import IntegrationTest , client_context , skip_if_rust_bson , unittest
31+ from test import IntegrationTest , client_context , unittest
3232
3333from bson import (
3434 _BUILT_IN_TYPES ,
5252from bson .errors import InvalidDocument
5353from bson .int64 import Int64
5454from bson .raw_bson import RawBSONDocument
55- from pymongo .errors import DuplicateKeyError
56- from pymongo .message import _CursorAddress
5755from pymongo .synchronous .collection import ReturnDocument
5856from pymongo .synchronous .helpers import next
57+ from pymongo .errors import DuplicateKeyError
58+ from pymongo .message import _CursorAddress
5959
6060_IS_SYNC = True
6161
@@ -196,12 +196,14 @@ def test_decode_file_iter(self):
196196 fileobj .close ()
197197
198198
199+ @skip_if_rust_bson ("Decimal/Decimal128 custom type codecs not yet implemented" )
199200class TestCustomPythonBSONTypeToBSONMonolithicCodec (CustomBSONTypeTests , unittest .TestCase ):
200201 @classmethod
201202 def setUpClass (cls ):
202203 cls .codecopts = DECIMAL_CODECOPTS
203204
204205
206+ @skip_if_rust_bson ("Decimal/Decimal128 custom type codecs not yet implemented" )
205207class TestCustomPythonBSONTypeToBSONMultiplexedCodec (CustomBSONTypeTests , unittest .TestCase ):
206208 @classmethod
207209 def setUpClass (cls ):
@@ -211,7 +213,6 @@ def setUpClass(cls):
211213 cls .codecopts = codec_options
212214
213215
214- @skip_if_rust_bson ("fallback encoders not yet implemented" )
215216class TestBSONFallbackEncoder (unittest .TestCase ):
216217 def _get_codec_options (self , fallback_encoder ):
217218 type_registry = TypeRegistry (fallback_encoder = fallback_encoder )
@@ -337,7 +338,6 @@ def test_type_checks(self):
337338 self .assertFalse (issubclass (TypeEncoder , TypeDecoder ))
338339
339340
340- @skip_if_rust_bson ("custom type encoders with fallback encoders not yet implemented" )
341341class TestBSONCustomTypeEncoderAndFallbackEncoderTandem (unittest .TestCase ):
342342 TypeA : Any
343343 TypeB : Any
@@ -624,7 +624,6 @@ class MyType(pytype): # type: ignore
624624 run_test (TypeCodec , {"bson_type" : Decimal128 , "transform_bson" : lambda x : x })
625625
626626
627- @skip_if_rust_bson ("custom type decoders and RawBSONDocument not yet fully compatible" )
628627class TestCollectionWCustomType (IntegrationTest ):
629628 def setUp (self ):
630629 super ().setUp ()
@@ -913,7 +912,9 @@ def run_test(doc_cls):
913912 run_test (doc_cls )
914913
915914
916- class TestCollectionChangeStreamsWCustomTypes (IntegrationTest , ChangeStreamsWCustomTypesTestMixin ):
915+ class TestCollectionChangeStreamsWCustomTypes (
916+ IntegrationTest , ChangeStreamsWCustomTypesTestMixin
917+ ):
917918 @client_context .require_change_streams
918919 def setUp (self ):
919920 super ().setUp ()
@@ -930,7 +931,9 @@ def create_targets(self, *args, **kwargs):
930931 self .input_target .delete_many ({})
931932
932933
933- class TestDatabaseChangeStreamsWCustomTypes (IntegrationTest , ChangeStreamsWCustomTypesTestMixin ):
934+ class TestDatabaseChangeStreamsWCustomTypes (
935+ IntegrationTest , ChangeStreamsWCustomTypesTestMixin
936+ ):
934937 @client_context .require_version_min (4 , 2 , 0 )
935938 @client_context .require_change_streams
936939 def setUp (self ):
@@ -948,7 +951,9 @@ def create_targets(self, *args, **kwargs):
948951 self .input_target .insert_one ({"data" : "dummy" })
949952
950953
951- class TestClusterChangeStreamsWCustomTypes (IntegrationTest , ChangeStreamsWCustomTypesTestMixin ):
954+ class TestClusterChangeStreamsWCustomTypes (
955+ IntegrationTest , ChangeStreamsWCustomTypesTestMixin
956+ ):
952957 @client_context .require_version_min (4 , 2 , 0 )
953958 @client_context .require_change_streams
954959 def setUp (self ):
0 commit comments