# Path: rlp/exceptions.py
# class SerializationError(RLPException):
#     """Exception raised if serialization fails.
# 
#     :ivar obj: the object that could not be serialized
#     """
# 
#     def __init__(self, message, obj):
#         super(SerializationError, self).__init__(message)
#         self.obj = obj
# 
# Path: rlp/sedes/big_endian_int.py
# class BigEndianInt(object):
#     def __init__(self, l=None):
#     def serialize(self, obj):
#     def deserialize(self, serial):
# 
# Path: rlp/utils.py
# ALL_BYTES = tuple(
#     struct.pack('B', i)
#     for i in range(256)
# )


import binascii
import pytest
    import ctypes
    import sys
    import time
from eth_utils import int_to_big_endian
from rlp import SerializationError
from rlp.sedes import big_endian_int, BigEndianInt
from rlp.utils import ALL_BYTES
    with pytest.raises(SerializationError):
        big_endian_int.serialize(value)


def test_serialization():
    for n in random_integers:
        serial = big_endian_int.serialize(n)
        deserialized = big_endian_int.deserialize(serial)
        assert deserialized == n
        if n != 0:
            assert serial[0] != b'\x00'  # is not checked


def test_single_byte():
    for n, s in single_bytes:
        serial = big_endian_int.serialize(n)
        assert serial == s
        deserialized = big_endian_int.deserialize(serial)
        assert deserialized == n


def test_valid_data():
    for n, serial in valid_data:
        serialized = big_endian_int.serialize(n)
        deserialized = big_endian_int.deserialize(serial)
        assert serialized == serial
        assert deserialized == n


def test_fixedlength():

# Path: rlp/exceptions.py
# class SerializationError(RLPException):
#     """Exception raised if serialization fails.
# 
#     :ivar obj: the object that could not be serialized
#     """
# 
#     def __init__(self, message, obj):
#         super(SerializationError, self).__init__(message)
#         self.obj = obj
# 
# Path: rlp/sedes/big_endian_int.py
# class BigEndianInt(object):
#     def __init__(self, l=None):
#     def serialize(self, obj):
#     def deserialize(self, serial):
# 
# Path: rlp/utils.py
# ALL_BYTES = tuple(
#     struct.pack('B', i)
#     for i in range(256)
# )


# Path: tests/test_big_endian.py
import binascii
import pytest
    import ctypes
    import sys
    import time
from eth_utils import int_to_big_endian
from rlp import SerializationError
from rlp.sedes import big_endian_int, BigEndianInt
from rlp.utils import ALL_BYTES

    with pytest.raises(SerializationError):
        big_endian_int.serialize(value)


def test_serialization():
    for n in random_integers:
        serial = big_endian_int.serialize(n)
        deserialized = big_endian_int.deserialize(serial)
        assert deserialized == n
        if n != 0:
            assert serial[0] != b'\x00'  # is not checked


def test_single_byte():
    for n, s in single_bytes:
        serial = big_endian_int.serialize(n)
        assert serial == s
        deserialized = big_endian_int.deserialize(serial)
        assert deserialized == n


def test_valid_data():
    for n, serial in valid_data:
        serialized = big_endian_int.serialize(n)
        deserialized = big_endian_int.deserialize(serial)
        assert serialized == serial
        assert deserialized == n


def test_fixedlength():

    s = BigEndianInt(4)