comparison 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
comparison
equal deleted inserted replaced
110:ba677506e95e 111:7f6fb8103db0
88 newdir = os.path.join(directory, name) 88 newdir = os.path.join(directory, name)
89 os.mkdir(newdir) 89 os.mkdir(newdir)
90 self.create_files(newdir, contents) 90 self.create_files(newdir, contents)
91 else: 91 else:
92 writefile(os.path.join(directory, name), contents) 92 writefile(os.path.join(directory, name), contents)
93
94 def checkFileContents(self, filename, contents):
95 """check the contents of a file"""
96 self.assertEquals(open(filename).read(), contents)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)