diff options
author | Nir Soffer <nirsof@gmail.com> | 2020-08-29 02:21:50 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-09-15 11:05:12 +0200 |
commit | a242b19e80faa95fd5856fca2d4115e853d465b1 (patch) | |
tree | ed2f7f4a0535e15efd84b1aae5c99177e605d6b8 /tests/qemu-iotests/194 | |
parent | f765af87c203723f77da37716a74f0eca99f192c (diff) |
qemu-iotests: Support varargs syntax in FilePaths
Accept variable number of names instead of a sequence:
with FilePaths("a", "b", "c") as (a, b, c):
The disadvantage is that base_dir must be used as kwarg:
with FilePaths("a", "b", base_dir=soc_dir) as (sock1, sock2):
But this is more clear and calling optional argument as positional
arguments is bad idea anyway.
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200828232152.205833-4-nsoffer@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/194')
-rwxr-xr-x | tests/qemu-iotests/194 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index da7c4265ec..08389f474e 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@ -26,8 +26,8 @@ iotests.script_initialize(supported_fmts=['qcow2', 'qed', 'raw'], with iotests.FilePath('source.img') as source_img_path, \ iotests.FilePath('dest.img') as dest_img_path, \ - iotests.FilePaths(['migration.sock', 'nbd.sock'], iotests.sock_dir) as \ - [migration_sock_path, nbd_sock_path], \ + iotests.FilePaths('migration.sock', 'nbd.sock', base_dir=iotests.sock_dir) \ + as (migration_sock_path, nbd_sock_path), \ iotests.VM('source') as source_vm, \ iotests.VM('dest') as dest_vm: |