1 We have no ujson, orjson, and cbor2 optional dependencies packaged yet.
3 --- cattrs-24.1.2/tests/test_preconf.py.orig
4 +++ cattrs-24.1.2/tests/test_preconf.py
8 from cattrs.preconf.bson import make_converter as bson_make_converter
9 -from cattrs.preconf.cbor2 import make_converter as cbor2_make_converter
10 from cattrs.preconf.json import make_converter as json_make_converter
11 from cattrs.preconf.msgpack import make_converter as msgpack_make_converter
12 from cattrs.preconf.tomlkit import make_converter as tomlkit_make_converter
13 -from cattrs.preconf.ujson import make_converter as ujson_make_converter
18 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
21 +@pytest.mark.skip(reason="no ujson available")
22 def test_ujson(everything: Everything):
23 from ujson import dumps as ujson_dumps
24 from ujson import loads as ujson_loads
26 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
29 +@pytest.mark.skip(reason="no ujson available")
30 def test_ujson_converter(everything: Everything):
31 converter = ujson_make_converter()
32 raw = converter.dumps(everything)
34 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
37 +@pytest.mark.skip(reason="no ujson available")
38 def test_ujson_converter_unstruct_collection_overrides(everything: Everything):
39 converter = ujson_make_converter(
40 unstruct_collection_overrides={AbstractSet: sorted}
43 detailed_validation=...,
45 +@pytest.mark.skip(reason="no ujson available")
46 def test_ujson_unions(union_and_val: tuple, detailed_validation: bool):
47 """Native union passthrough works."""
48 converter = ujson_make_converter(detailed_validation=detailed_validation)
53 +@pytest.mark.skip(reason="no orjson available")
54 def test_orjson(everything: Everything, detailed_validation: bool):
55 from orjson import dumps as orjson_dumps
56 from orjson import loads as orjson_loads
61 +@pytest.mark.skip(reason="no orjson available")
62 def test_orjson_converter(everything: Everything, detailed_validation: bool):
63 from cattrs.preconf.orjson import make_converter as orjson_make_converter
66 min_int=-9223372036854775808, max_int=9223372036854775807, allow_inf=False
69 +@pytest.mark.skip(reason="no orjson available")
70 def test_orjson_converter_unstruct_collection_overrides(everything: Everything):
71 from cattrs.preconf.orjson import make_converter as orjson_make_converter
75 detailed_validation=...,
77 +@pytest.mark.skip(reason="no orjson available")
78 def test_orjson_unions(union_and_val: tuple, detailed_validation: bool):
79 """Native union passthrough works."""
80 from cattrs.preconf.orjson import make_converter as orjson_make_converter
84 @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
85 +@pytest.mark.skip(reason="no cbor2 available")
86 def test_cbor2(everything: Everything):
87 from cbor2 import dumps as cbor2_dumps
88 from cbor2 import loads as cbor2_loads
92 @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
93 +@pytest.mark.skip(reason="no cbor2 available")
94 def test_cbor2_converter(everything: Everything):
95 converter = cbor2_make_converter()
96 raw = converter.dumps(everything)
100 @given(everythings(min_int=-9223372036854775808, max_int=18446744073709551615))
101 +@pytest.mark.skip(reason="no cbor2 available")
102 def test_cbor2_converter_unstruct_collection_overrides(everything: Everything):
103 converter = cbor2_make_converter(
104 unstruct_collection_overrides={AbstractSet: sorted}
107 detailed_validation=...,
109 +@pytest.mark.skip(reason="no cbor2 available")
110 def test_cbor2_unions(union_and_val: tuple, detailed_validation: bool):
111 """Native union passthrough works."""
112 converter = cbor2_make_converter(detailed_validation=detailed_validation)