summaryrefslogtreecommitdiff
path: root/tests/cachekey/cachekey.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-20 14:12:06 +0000
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-21 09:21:09 +0000
commitbde70c9585507b315245dd333481aebc7b516d0a (patch)
tree788faecb564e0ebf6a748ea9a188dc99654b9e28 /tests/cachekey/cachekey.py
parente1b1e6c9d552cd960e1531023ead44c9f3408b45 (diff)
downloadbuildstream-bde70c9585507b315245dd333481aebc7b516d0a.tar.gz
tests: when comparing lists/dicts, compare all at oncebschubert/better-pytest-report
This allows pytest to show a better report of the difference between the two lists and not just tell that one entry is wrong.
Diffstat (limited to 'tests/cachekey/cachekey.py')
-rw-r--r--tests/cachekey/cachekey.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index 2bc60582a..f352dad3d 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -255,6 +255,7 @@ def test_keys_stable_over_targets(cli, datafiles):
ordering2_result.assert_success()
ordering2_cache_keys = parse_output_keys(ordering2_result.output)
- for element in ordering1_cache_keys:
- assert ordering1_cache_keys[element] == ordering2_cache_keys[element]
- assert ordering1_cache_keys[element] == all_cache_keys[element]
+ keys = ordering1_cache_keys.keys()
+
+ assert {key: ordering2_cache_keys[key] for key in keys} == ordering1_cache_keys
+ assert {key: all_cache_keys[key] for key in keys} == ordering1_cache_keys