diff options
author | William Henderson <william.henderson@nutanix.com> | 2023-09-07 16:04:33 +0000 |
---|---|---|
committer | John Levon <john.levon@nutanix.com> | 2023-09-15 13:06:15 +0100 |
commit | dc06fe72a4f7de40e3d31c25e66b670b70fcb5c5 (patch) | |
tree | 1c9145fe8f61a9821c3e275da662a8b12aa7d5d7 | |
parent | e5b52d2a27bfa7fba24d5af75cf9ccf01ea9afbf (diff) | |
download | libvfio-user-dc06fe72a4f7de40e3d31c25e66b670b70fcb5c5.zip libvfio-user-dc06fe72a4f7de40e3d31c25e66b670b70fcb5c5.tar.gz libvfio-user-dc06fe72a4f7de40e3d31c25e66b670b70fcb5c5.tar.bz2 |
refactor bad python
Signed-off-by: William Henderson <william.henderson@nutanix.com>
-rw-r--r-- | test/py/test_migration.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/test_migration.py b/test/py/test_migration.py index 92c3292..7370b52 100644 --- a/test/py/test_migration.py +++ b/test/py/test_migration.py @@ -391,7 +391,7 @@ def test_handle_mig_data_read_short_write(): payload = bytes(mig_data_payload(data)) # don't send the last byte - msg(ctx, sock, VFIO_USER_MIG_DATA_READ, payload[0:len(payload) - 1], + msg(ctx, sock, VFIO_USER_MIG_DATA_READ, payload[:-1], expect=errno.EINVAL) @@ -474,7 +474,7 @@ def test_device_feature_short_write(): payload = bytes(payload) # don't send the last byte - msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, payload[0:len(payload) - 1], + msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, payload[:-1], expect=errno.EINVAL) |