def test_loads_citm_catalog_simplejson(benchmark):
    benchmark.group = "citm_catalog.json deserialization"
    benchmark.extra_info["lib"] = "simplejson"
    data = read_fixture_str("citm_catalog.json.xz")
    benchmark.extra_info["correct"] = json_loads(
        simplejson_dumps(simplejson_loads(data))) == json_loads(data)
    benchmark(simplejson_loads, data)
def test_loads_citm_catalog_simplejson(benchmark):
    benchmark.group = 'citm_catalog.json deserialization'
    benchmark.extra_info['lib'] = 'simplejson'
    data = read_fixture_str("citm_catalog.json.xz")
    benchmark.extra_info['correct'] = json_loads(
        simplejson_dumps(simplejson_loads(data))) == json_loads(data)
    benchmark(simplejson_loads, data)
Exemple #3
0
 def _simplejson_dumps(obj: Any) -> str:
     return simplejson_dumps(obj, namedtuple_as_object=True, **kwargs)