Finished Env._finalize_core() and corresponding unit tests

This commit is contained in:
Jason Gerard DeRose
2008-10-24 20:02:14 -06:00
parent 8ca44bcbfa
commit ac4efac394
4 changed files with 208 additions and 24 deletions

View File

@@ -61,6 +61,14 @@ class TempDir(object):
assert path.isfile(f) and not path.islink(f)
return f
def write(self, content, *parts):
d = self.makedirs(*parts[:-1])
f = path.join(d, parts[-1])
assert not path.exists(f)
open(f, 'w').write(content)
assert path.isfile(f) and not path.islink(f)
return f
def join(self, *parts):
return path.join(self.path, *parts)