[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/32] tests/functional: resolve str(Asset) to cache file path
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v3 03/32] tests/functional: resolve str(Asset) to cache file path |
Date: |
Tue, 17 Dec 2024 15:59:24 +0000 |
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>
---
tests/functional/qemu_test/asset.py | 3 +++
1 file changed, 3 insertions(+)
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 @@ def __repr__(self):
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
--
2.46.0
- [PATCH v3 00/32] tests/functional: various improvements wrt assets/scratch files, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 01/32] tests/functional: add execute permission to aspeed tests, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 02/32] tests/functional: remove many unused imports, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 04/32] tests/functional: remove duplicated 'which' function impl, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 05/32] tests/functional: simplify 'which' implementation, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 03/32] tests/functional: resolve str(Asset) to cache file path,
Daniel P . Berrangé <=
- [PATCH v3 06/32] tests/functional: drop 'tesseract_available' helper, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 07/32] tests/functional: introduce some helpful decorators, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 08/32] tests/functional: switch to new test skip decorators, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 10/32] tests/functional: add helpers for building file paths, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 09/32] tests/functional: drop 'has_cmd' and 'has_cmds' helpers, Daniel P . Berrangé, 2024/12/17
- [PATCH v3 11/32] tests/functional: switch over to using self.log_file(...), Daniel P . Berrangé, 2024/12/17
- [PATCH v3 12/32] tests/functional: switch over to using self.build_file(...), Daniel P . Berrangé, 2024/12/17
- [PATCH v3 13/32] tests/functional: switch over to using self.data_file(...), Daniel P . Berrangé, 2024/12/17