@@ -36,7 +36,7 @@ def config(workspace):
3636 """Return a config object."""
3737 cfg = Config (workspace .root_uri , {}, 0 , {})
3838 cfg ._plugin_settings = {
39- "plugins" : {"black" : {"line_length" : 88 , "cache_config" : True }}
39+ "plugins" : {"black" : {"line_length" : 88 , "cache_config" : False }}
4040 }
4141 return cfg
4242
@@ -313,16 +313,15 @@ def test_pylsp_format_line_length(
313313
314314
315315def test_cache_config (config , unformatted_document ):
316- # Cache should be working by default
316+ # Cache should be off by default
317317 for _ in range (5 ):
318318 pylsp_format_document (config , unformatted_document )
319- assert _load_config .cache_info ().hits == 4
319+ assert _load_config .cache_info ().hits == 0
320320
321- # Clear cache and disable it
322- _load_config .cache_clear ()
323- config .update ({"plugins" : {"black" : {"cache_config" : False }}})
321+ # Enable cache
322+ config .update ({"plugins" : {"black" : {"cache_config" : True }}})
324323
325- # Cache should not be working now
324+ # Cache should be working now
326325 for _ in range (5 ):
327326 pylsp_format_document (config , unformatted_document )
328- assert _load_config .cache_info ().hits == 0
327+ assert _load_config .cache_info ().hits == 4
0 commit comments