# Path: numcodecs/tests/common.py
# def compare_arrays(arr, res, precision=None):
# def check_encode_decode(arr, codec, precision=None):
# def check_encode_decode_partial(arr, codec, precision=None):
# def assert_array_items_equal(res, arr):
# def check_encode_decode_array(arr, codec):
# def check_config(codec):
# def check_repr(stmt):
# def check_backwards_compatibility(codec_id, arrays, codecs, precision=None, prefix=None):
# def check_err_decode_object_buffer(compressor):
# def check_err_encode_object_buffer(compressor):
# def check_max_buffer_size(codec):


import unittest
import numpy as np
    from numcodecs.msgpacks import MsgPack
from numcodecs.tests.common import (check_config, check_repr, check_encode_decode_array,
                                    check_backwards_compatibility, greetings)
def test_config():
    check_config(MsgPack())


def test_repr():
    check_repr("MsgPack(raw=False, use_bin_type=True, use_single_float=False)")
    check_repr("MsgPack(raw=True, use_bin_type=False, use_single_float=True)")


def test_backwards_compatibility():
    codec = MsgPack()
    check_backwards_compatibility(codec.codec_id, arrays, [codec])


def test_non_numpy_inputs():
    codec = MsgPack()
    # numpy will infer a range of different shapes and dtypes for these inputs.
    # Make sure that round-tripping through encode preserves this.
    data = [
        [0, 1],
        [[0, 1], [2, 3]],
        [[0], [1], [2, 3]],
        [[[0, 0]], [[1, 1]], [[2, 3]]],
        ["1"],
        ["11", "11"],
        ["11", "1", "1"],
        [{}],
        [{"key": "value"}, ["list", "of", "strings"]],
        [b"1"],
        [b"11", b"11"],

# Path: numcodecs/tests/common.py
# def compare_arrays(arr, res, precision=None):
# def check_encode_decode(arr, codec, precision=None):
# def check_encode_decode_partial(arr, codec, precision=None):
# def assert_array_items_equal(res, arr):
# def check_encode_decode_array(arr, codec):
# def check_config(codec):
# def check_repr(stmt):
# def check_backwards_compatibility(codec_id, arrays, codecs, precision=None, prefix=None):
# def check_err_decode_object_buffer(compressor):
# def check_err_encode_object_buffer(compressor):
# def check_max_buffer_size(codec):


# Path: numcodecs/tests/test_msgpacks.py
import unittest
import numpy as np
    from numcodecs.msgpacks import MsgPack
from numcodecs.tests.common import (check_config, check_repr, check_encode_decode_array,
                                    check_backwards_compatibility, greetings)

def test_config():
    check_config(MsgPack())


def test_repr():
    check_repr("MsgPack(raw=False, use_bin_type=True, use_single_float=False)")
    check_repr("MsgPack(raw=True, use_bin_type=False, use_single_float=True)")


def test_backwards_compatibility():
    codec = MsgPack()
    check_backwards_compatibility(codec.codec_id, arrays, [codec])


def test_non_numpy_inputs():
    codec = MsgPack()
    # numpy will infer a range of different shapes and dtypes for these inputs.
    # Make sure that round-tripping through encode preserves this.
    data = [
        [0, 1],
        [[0, 1], [2, 3]],
        [[0], [1], [2, 3]],
        [[[0, 0]], [[1, 1]], [[2, 3]]],
        ["1"],
        ["11", "11"],
        ["11", "1", "1"],
        [{}],
        [{"key": "value"}, ["list", "of", "strings"]],
        [b"1"],
        [b"11", b"11"],

        [b"11", b"1", b"1"],