def test_ic_nesting_ds_context(tmp_path): c = Cache(tmp_path) c.set_query({'hi': 'there'}, 'dude') with c.ignore_cache(): with c.ignore_cache(): pass assert c.lookup_query({'hi': 'there'}) is None
def test_ic_memory_hit_ds_context(tmp_path): c = Cache(tmp_path) r = 10 c.set_inmem('dude', r) with c.ignore_cache(): assert c.lookup_inmem('dude') is None