]> www.infradead.org Git - users/dwmw2/qemu.git/commit
tests/functional/qemu_test/decorators: Fix bad check for imports
authorThomas Huth <thuth@redhat.com>
Wed, 22 Jan 2025 13:43:13 +0000 (14:43 +0100)
committerThomas Huth <thuth@redhat.com>
Thu, 30 Jan 2025 09:30:36 +0000 (10:30 +0100)
commitaca2c48e4d26426c14499fd3d8a2e333ac57d267
treef74b99dcf492319aa1e7d36c4bf2169c8fd0a9cd
parent871af84dd599fab68c8ed414d9ecbdb2bcfc5801
tests/functional/qemu_test/decorators: Fix bad check for imports

skipIfMissingImports should use importlib.import_module() for checking
whether a module with the name stored in the "impname" variable is
available or not, otherwise the code tries to import a module with
the name "impname" instead.
(This bug hasn't been noticed before since there is another issue
with this decorator that will be fixed by the next patch)

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250122134315.1448794-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/functional/qemu_test/decorators.py