[Tarantool-patches] [PATCH 3/4] test: make convert to hex compatible with Python 3.x
Leonid Vasiliev
lvasiliev at tarantool.org
Tue Dec 15 14:55:15 MSK 2020
Hi! Thank you for the patch.
On 11.12.2020 11:42, Sergey Bronnikov via Tarantool-patches wrote:
> From: Sergey Bronnikov <sergeyb at tarantool.org>
>
> Part of #5538
> ---
> test/box-py/iproto.test.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/test/box-py/iproto.test.py b/test/box-py/iproto.test.py
> index 25ead43c4..72400923c 100644
> --- a/test/box-py/iproto.test.py
> +++ b/test/box-py/iproto.test.pyHi
> @@ -191,7 +191,11 @@ for test in TESTS:
> print("STR", size)
> print("--")
> for fmt in it:
> - print("0x" + fmt.encode("hex"), "=>", end=" ")
> + try:
> + # Python 3
> + print("0x" + "hex".encode("utf-8").hex(), "=>", end=" ")
Maybe fmt.encode("utf-8").hex()?
Please, add a comment that describing the difference between python2 and
python3 in this print.
> + except AttributeError:
> + print("0x" + fmt.encode("hex"), "=>", end=" ")
> field = "*" * size
> c._send_request(RawInsert(c, space_id, "\x91" + fmt + field))
> tuple = space.select(field)[0]
>
More information about the Tarantool-patches
mailing list