We have no ujson, orjson, and cbor2 optional dependencies packaged yet. --- cattrs-24.1.2/tests/test_preconf.py.orig +++ cattrs-24.1.2/tests/test_preconf.py @@ -44,11 +44,9 @@ TupleSubscriptable, ) from cattrs.preconf.bson import make_converter as bson_make_converter -from cattrs.preconf.cbor2 import make_converter as cbor2_make_converter from cattrs.preconf.json import make_converter as json_make_converter from cattrs.preconf.msgpack import make_converter as msgpack_make_converter from cattrs.preconf.tomlkit import make_converter as tomlkit_make_converter -from cattrs.preconf.ujson import make_converter as ujson_make_converter @define @@ -338,6 +336,7 @@ min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False ) ) +@pytest.mark.skip(reason="no ujson available") def test_ujson(everything: Everything): from ujson import dumps as ujson_dumps from ujson import loads as ujson_loads @@ -352,6 +351,7 @@ min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False ) ) +@pytest.mark.skip(reason="no ujson available") def test_ujson_converter(everything: Everything): converter = ujson_make_converter() raw = converter.dumps(everything) @@ -363,6 +363,7 @@ min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False ) ) +@pytest.mark.skip(reason="no ujson available") def test_ujson_converter_unstruct_collection_overrides(everything: Everything): converter = ujson_make_converter( unstruct_collection_overrides={AbstractSet: sorted} @@ -381,6 +382,7 @@ ), detailed_validation=..., ) +@pytest.mark.skip(reason="no ujson available") def test_ujson_unions(union_and_val: tuple, detailed_validation: bool): """Native union passthrough works.""" converter = ujson_make_converter(detailed_validation=detailed_validation) @@ -396,6 +398,7 @@ ), booleans(), ) +@pytest.mark.skip(reason="no orjson available") def test_orjson(everything: Everything, detailed_validation: bool): from orjson import dumps as orjson_dumps from orjson import loads as orjson_loads @@ -414,6 +417,7 @@ ), booleans(), ) +@pytest.mark.skip(reason="no orjson available") def test_orjson_converter(everything: Everything, detailed_validation: bool): from cattrs.preconf.orjson import make_converter as orjson_make_converter @@ -428,6 +432,7 @@ min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False ) ) +@pytest.mark.skip(reason="no orjson available") def test_orjson_converter_unstruct_collection_overrides(everything: Everything): from cattrs.preconf.orjson import make_converter as orjson_make_converter @@ -449,6 +454,7 @@ ), detailed_validation=..., ) +@pytest.mark.skip(reason="no orjson available") def test_orjson_unions(union_and_val: tuple, detailed_validation: bool): """Native union passthrough works.""" from cattrs.preconf.orjson import make_converter as orjson_make_converter @@ -657,6 +663,7 @@ @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615)) +@pytest.mark.skip(reason="no cbor2 available") def test_cbor2(everything: Everything): from cbor2 import dumps as cbor2_dumps from cbor2 import loads as cbor2_loads @@ -667,6 +674,7 @@ @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615)) +@pytest.mark.skip(reason="no cbor2 available") def test_cbor2_converter(everything: Everything): converter = cbor2_make_converter() raw = converter.dumps(everything) @@ -674,6 +682,7 @@ @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615)) +@pytest.mark.skip(reason="no cbor2 available") def test_cbor2_converter_unstruct_collection_overrides(everything: Everything): converter = cbor2_make_converter( unstruct_collection_overrides={AbstractSet: sorted} @@ -691,6 +700,7 @@ ), detailed_validation=..., ) +@pytest.mark.skip(reason="no cbor2 available") def test_cbor2_unions(union_and_val: tuple, detailed_validation: bool): """Native union passthrough works.""" converter = cbor2_make_converter(detailed_validation=detailed_validation)