comparison test/test_builder.py @ 195:e3ab8aca2b08

Make filesupport.py more PEP8 conformant. Rename method checkFileContents to check_file_contents. Update the callers.
author Bernhard Herzog <bh@intevation.de>
date Thu, 31 Jul 2008 10:36:17 +0000
parents 2622bf5ed5bd
children cbcd8f549ff7
comparison
equal deleted inserted replaced
194:86360f3d5611 195:e3ab8aca2b08
36 self.command_line_file = self.temp_file_name("command_line") 36 self.command_line_file = self.temp_file_name("command_line")
37 self.root_command = [sys.executable, self.dump_command_line, 37 self.root_command = [sys.executable, self.dump_command_line,
38 self.command_line_file] 38 self.command_line_file]
39 39
40 def check_command_line(self, args): 40 def check_command_line(self, args):
41 self.checkFileContents(self.command_line_file, repr(args)) 41 self.check_file_contents(self.command_line_file, repr(args))
42 42
43 43
44 class TestPBuilder(PBuilderTests): 44 class TestPBuilder(PBuilderTests):
45 45
46 def test_init_pbuilder(self): 46 def test_init_pbuilder(self):
83 "REMOVEPACKAGES=lilo\n" 83 "REMOVEPACKAGES=lilo\n"
84 "MIRRORSITE=\"http://example.com/debian\"\n" 84 "MIRRORSITE=\"http://example.com/debian\"\n"
85 "OTHERMIRROR=\"deb file://%(basedir)s/extra-pkg ./\"\n" 85 "OTHERMIRROR=\"deb file://%(basedir)s/extra-pkg ./\"\n"
86 "BINDMOUNTS=\"%(basedir)s/extra-pkg\"\n" 86 "BINDMOUNTS=\"%(basedir)s/extra-pkg\"\n"
87 "PKGNAME_LOGFILE=yes\n" % locals()) 87 "PKGNAME_LOGFILE=yes\n" % locals())
88 self.checkFileContents(pbuilderrc, pbuilderrc_contents) 88 self.check_file_contents(pbuilderrc, pbuilderrc_contents)
89 89
90 # The Packages file is empty for now. 90 # The Packages file is empty for now.
91 self.checkFileContents(os.path.join(basedir, "extra-pkg", "Packages"), 91 self.check_file_contents(os.path.join(basedir, "extra-pkg", "Packages"),
92 "") 92 "")
93 # check the text written to stdout. This test is a little too 93 # check the text written to stdout. This test is a little too
94 # strict because it checks the exact output. 94 # strict because it checks the exact output.
95 self.assertEquals(captured_stdout.getvalue(), 95 self.assertEquals(captured_stdout.getvalue(),
96 "creating directory: '%(basedir_repr)s/base'\n" 96 "creating directory: '%(basedir_repr)s/base'\n"
97 "creating directory: '%(basedir_repr)s/build'\n" 97 "creating directory: '%(basedir_repr)s/build'\n"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)