[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports |
Date: |
Thu, 16 Sep 2021 06:27:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 9/16/21 6:09 AM, John Snow wrote:
> We need to import things from the qemu namespace; importing the
> namespace alone doesn't bring the submodules with it -- unless someone
> else (like iotests.py) imports them too.
>
> Adjust the imports.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> tests/qemu-iotests/tests/mirror-top-perms | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qemu-iotests/tests/mirror-top-perms
> b/tests/qemu-iotests/tests/mirror-top-perms
> index 2fc8dd66e0..de18182590 100755
> --- a/tests/qemu-iotests/tests/mirror-top-perms
> +++ b/tests/qemu-iotests/tests/mirror-top-perms
> @@ -25,7 +25,8 @@ from iotests import qemu_img
>
> # Import qemu after iotests.py has amended sys.path
> # pylint: disable=wrong-import-order
> -import qemu
> +from qemu import qmp
> +from qemu.machine import machine
Not straight-forward import name...
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
- [PATCH v3 01/16] python: Update for pylint 2.10, (continued)
- [PATCH v3 01/16] python: Update for pylint 2.10, John Snow, 2021/09/16
- [PATCH v3 03/16] iotests/migrate-bitmaps-postcopy-test: declare instance variables, John Snow, 2021/09/16
- [PATCH v3 04/16] iotests/migrate-bitmaps-test: delint, John Snow, 2021/09/16
- [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports, John Snow, 2021/09/16
- Re: [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports,
Philippe Mathieu-Daudé <=
- Re: [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports, Hanna Reitz, 2021/09/17
- [PATCH v3 05/16] iotests/297: modify is_python_file to work from any CWD, John Snow, 2021/09/16
- [PATCH v3 06/16] iotests/297: Add get_files() function, John Snow, 2021/09/16
- [PATCH v3 07/16] iotests/297: Don't rely on distro-specific linter binaries, John Snow, 2021/09/16