This commit is contained in:
Benjamin Peterson 2014-04-04 13:59:46 -04:00
commit 3253fb1cb3
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ class TempDirMixin(object):
def tearDown(self):
os.chdir(self.old_dir)
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)
shutil.rmtree(self.temp_dir, True)
def create_readonly_file(self, filename):