Mercurial > treepkg
diff test/filesupport.py @ 111:7f6fb8103db0
Move the sed-like replacement code from enterprise/kdepim.py to treepkg/util.py
This creates a new function treepkg.util.replace_in_file with some tests
in test/test_util.py and new test support code in test/filesupport.py.
Also, adapt enterprise/kdepim.py to use the new function.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 19 Mar 2008 19:50:32 +0000 |
parents | 98a7d70746a9 |
children | 007d7f2aa184 |
line wrap: on
line diff
--- a/test/filesupport.py Wed Mar 19 15:00:54 2008 +0000 +++ b/test/filesupport.py Wed Mar 19 19:50:32 2008 +0000 @@ -90,3 +90,7 @@ self.create_files(newdir, contents) else: writefile(os.path.join(directory, name), contents) + + def checkFileContents(self, filename, contents): + """check the contents of a file""" + self.assertEquals(open(filename).read(), contents)