diff options
Diffstat (limited to 'rtemsspec/tests/test_items_itemcache.py')
-rw-r--r-- | rtemsspec/tests/test_items_itemcache.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rtemsspec/tests/test_items_itemcache.py b/rtemsspec/tests/test_items_itemcache.py index 0dbe0c69..93afb8bf 100644 --- a/rtemsspec/tests/test_items_itemcache.py +++ b/rtemsspec/tests/test_items_itemcache.py @@ -38,7 +38,14 @@ def test_config_error(): def test_load(tmpdir): config = create_item_cache_config_and_copy_spec(tmpdir, "spec-item-cache") - item_cache = ItemCache(config) + item_count = 0 + + def post_process_load(items): + nonlocal item_count + item_count = len(items) + + item_cache = ItemCache(config, post_process_load) + assert item_count == len(item_cache.all) assert item_cache.updates cache_dir = config["cache-directory"] assert os.path.exists(os.path.join(cache_dir, "spec", "spec.pickle")) |