@@ -132,24 +132,21 @@ def set(self, key, value):
132
132
else :
133
133
with f :
134
134
json .dump (value , f , indent = 2 , sort_keys = True )
135
+
135
136
if not cache_dir_exists_already :
136
137
self ._ensure_supporting_files ()
137
138
138
139
def _ensure_supporting_files (self ):
139
140
"""Create supporting files in the cache dir that are not really part of the cache."""
140
- if self ._cachedir .is_dir ():
141
- readme_path = self ._cachedir / "README.md"
142
- if not readme_path .is_file ():
143
- readme_path .write_text (README_CONTENT )
144
-
145
- gitignore_path = self ._cachedir .joinpath (".gitignore" )
146
- if not gitignore_path .is_file ():
147
- msg = u"# Created by pytest automatically.\n *"
148
- gitignore_path .write_text (msg , encoding = "UTF-8" )
149
-
150
- cachedir_tag_path = self ._cachedir .joinpath ("CACHEDIR.TAG" )
151
- if not cachedir_tag_path .is_file ():
152
- cachedir_tag_path .write_bytes (CACHEDIR_TAG_CONTENT )
141
+ readme_path = self ._cachedir / "README.md"
142
+ readme_path .write_text (README_CONTENT )
143
+
144
+ gitignore_path = self ._cachedir .joinpath (".gitignore" )
145
+ msg = u"# Created by pytest automatically.\n *"
146
+ gitignore_path .write_text (msg , encoding = "UTF-8" )
147
+
148
+ cachedir_tag_path = self ._cachedir .joinpath ("CACHEDIR.TAG" )
149
+ cachedir_tag_path .write_bytes (CACHEDIR_TAG_CONTENT )
153
150
154
151
155
152
class LFPlugin (object ):
0 commit comments