From: Daniel P. Berrangé Date: Tue, 17 Dec 2024 15:59:24 +0000 (+0000) Subject: tests/functional: resolve str(Asset) to cache file path X-Git-Tag: v10.0.0-rc0~114^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c27f452d61a4741605da2e03c0e6c756dd249f25;p=thirdparty%2Fqemu.git tests/functional: resolve str(Asset) to cache file path Allow an Asset object to be used in place of a filename but making its string representation resolve to the cache file path. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-ID: <20241217155953.3950506-4-berrange@redhat.com> Signed-off-by: Thomas Huth --- diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py index 559af0351fb..c5d3e73c4b1 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -39,6 +39,9 @@ class Asset: return "Asset: url=%s hash=%s cache=%s" % ( self.url, self.hash, self.cache_file) + def __str__(self): + return str(self.cache_file) + def _check(self, cache_file): if self.hash is None: return True