(self, tree_location)
| 322 | # Methods that change the working directory's content. |
| 323 | # |
| 324 | def set_tree(self, tree_location): |
| 325 | # It is not possible to remove the current directory. |
| 326 | d = os.getcwd() |
| 327 | os.chdir(os.path.dirname(self.workdir)) |
| 328 | shutil.rmtree(self.workdir, ignore_errors=False) |
| 329 | |
| 330 | if not os.path.isabs(tree_location): |
| 331 | tree_location = os.path.join(self.original_workdir, tree_location) |
| 332 | shutil.copytree(tree_location, self.workdir) |
| 333 | |
| 334 | os.chdir(d) |
| 335 | def make_writable(unused, dir, entries): |
| 336 | for e in entries: |
| 337 | name = os.path.join(dir, e) |
| 338 | os.chmod(name, os.stat(name).st_mode | 0222) |
| 339 | os.path.walk(".", make_writable, None) |
| 340 | |
| 341 | def write(self, file, content, wait=True): |
| 342 | nfile = self.native_file_name(file) |
no outgoing calls
no test coverage detected