

@pytest.mark.parametrize('command_type', ['command', 'response', 'error'])
def test_encodings(self, command_type):
    command = {
        command_type: 'write',
        'none': None,
        'bool': True,
        'str': string.printable,
        'int': 2271560481,
        'list': range(100),
    }
    encoding = encode(command)
    assert isinstance(encoding, str)
    decoding = decode(encoding)
    assert isinstance(decoding, dict)
    assert (decoding == command)
    assert (decoding['none'] is None)
    assert isinstance(command['bool'], bool)
    assert isinstance(decoding['str'], basestring)
    assert isinstance(decoding['int'], Integral)
    assert isinstance(decoding['list'], list)

dataset/ETHPy150Open geky/pyDAPLink/pyDAPLink/test/test_utility.py TestEncodings.test_encodings/VarMisuse@121/160 `decoding`->`command`