diff test/test_builder.py @ 181:81585486281b

Extend the PBuilder.run_script method so that the script can be called with arguments
author Bernhard Herzog <bh@intevation.de>
date Wed, 25 Jun 2008 13:36:38 +0000
parents b2fa3b0926d0
children 72e41b27f224
line wrap: on
line diff
--- a/test/test_builder.py	Tue Jun 24 19:02:20 2008 +0000
+++ b/test/test_builder.py	Wed Jun 25 13:36:38 2008 +0000
@@ -241,15 +241,23 @@
 
     def test_run_script(self):
         builder = PBuilder("my_pbuilderrc", self.root_command)
-        builder.run_script("my_script", logfile="the_logfile")
+        builder.run_script(["my_script"], logfile="the_logfile")
         self.check_command_line(['/usr/sbin/pbuilder', 'execute',
                                  '--configfile', 'my_pbuilderrc',
                                  '--logfile', 'the_logfile',
                                  'my_script'])
 
+    def test_run_script_with_arguments(self):
+        builder = PBuilder("my_pbuilderrc", self.root_command)
+        builder.run_script(["my_script", "--verbose"], logfile="the_logfile")
+        self.check_command_line(['/usr/sbin/pbuilder', 'execute',
+                                 '--configfile', 'my_pbuilderrc',
+                                 '--logfile', 'the_logfile',
+                                 'my_script', '--verbose'])
+
     def test_run_script_with_bindmounts(self):
         builder = PBuilder("my_pbuilderrc", self.root_command)
-        builder.run_script("my_script", logfile="the_logfile",
+        builder.run_script(["my_script"], logfile="the_logfile",
                            bindmounts=("/home/builder/foo",
                                        "/home/builder/treepkg"))
         self.check_command_line(['/usr/sbin/pbuilder', 'execute',
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)