diff --git a/tests/unit/config/test_configcache.py b/tests/unit/config/test_configcache.py index 91e2f22fa..7c0f6012f 100644 --- a/tests/unit/config/test_configcache.py +++ b/tests/unit/config/test_configcache.py @@ -50,3 +50,17 @@ def test_configcache_get_after_set(config_stub): assert not config.cache['auto_save.session'] config_stub.val.auto_save.session = True assert config.cache['auto_save.session'] + + +def test_configcache_naive_benchmark(config_stub, benchmark): + def _run_bench(): + for _i in range(10000): + # pylint: disable=pointless-statement + config.cache['tabs.padding'] + config.cache['tabs.indicator.width'] + config.cache['tabs.indicator.padding'] + config.cache['tabs.min_width'] + config.cache['tabs.max_width'] + config.cache['tabs.pinned.shrink'] + # pylint: enable=pointless-statement + benchmark(_run_bench)