diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2024-12-17 15:59:24 +0000 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-12-17 19:39:53 +0100 |
| commit | c27f452d61a4741605da2e03c0e6c756dd249f25 (patch) | |
| tree | a3a1c81415ac905a60a4dafe33ab3f22b45e2807 | |
| parent | 8a6253a43a43084275b31ef05e674e4987b05a84 (diff) | |
| download | focaccia-qemu-c27f452d61a4741605da2e03c0e6c756dd249f25.tar.gz focaccia-qemu-c27f452d61a4741605da2e03c0e6c756dd249f25.zip | |
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é <berrange@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20241217155953.3950506-4-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| -rw-r--r-- | tests/functional/qemu_test/asset.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py index 559af0351f..c5d3e73c4b 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 |