Read about our upcoming Code of Conduct on this issue

Commit 7991effe authored by Matti Picus's avatar Matti Picus
Browse files

close files opened by FileType option handling, there must be a better way?

parent 650405891542
......@@ -48,6 +48,9 @@ class TempDirMixin(object):
def tearDown(self):
os.chdir(self.old_dir)
import gc
# Force a collection which should close FileType() options
gc.collect()
for root, dirs, files in os.walk(self.temp_dir, topdown=False):
for name in files:
os.chmod(os.path.join(self.temp_dir, name), stat.S_IWRITE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment