@@ -36,7 +36,7 @@ def config(workspace):
36
36
"""Return a config object."""
37
37
cfg = Config (workspace .root_uri , {}, 0 , {})
38
38
cfg ._plugin_settings = {
39
- "plugins" : {"black" : {"line_length" : 88 , "cache_config" : True }}
39
+ "plugins" : {"black" : {"line_length" : 88 , "cache_config" : False }}
40
40
}
41
41
return cfg
42
42
@@ -313,16 +313,15 @@ def test_pylsp_format_line_length(
313
313
314
314
315
315
def test_cache_config (config , unformatted_document ):
316
- # Cache should be working by default
316
+ # Cache should be off by default
317
317
for _ in range (5 ):
318
318
pylsp_format_document (config , unformatted_document )
319
- assert _load_config .cache_info ().hits == 4
319
+ assert _load_config .cache_info ().hits == 0
320
320
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 }}})
324
323
325
- # Cache should not be working now
324
+ # Cache should be working now
326
325
for _ in range (5 ):
327
326
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