Nice branch, +1!
[1]
+def spawn_process(executable, args=(), env={}, path=None, uid=None, gid=None, + wait_pipes=True):
Please add a @param for describing what wait_pipes does.
[2]
+ def tearDown(self): + os.unlink(self.command)
No need for this, everything created with self.makeFile will be automatically removed.
[3] """ The process returns the expected standard error. """
self._write_command("#!/bin/sh\necho -n $@ >&2")
There's an extra blank between the docstring and the first line of the test.
[4]
+ def _write_command(self, command):
I'd suggest to drop this and use landscape.lib.fs.create_file instead (which maybe should be renamed write_file):
from landscape.lib.fs import create_file
def test_spawn_process_return_value(self): create_file(self.command, "#!/bin/sh\nexit 2")
def callback((out, err, code)):
This is because the less ad-hoc methods the test has the more readable it is.
« Back to merge proposal
Nice branch, +1!
[1]
+def spawn_process( executable, args=(), env={}, path=None, uid=None, gid=None,
+ wait_pipes=True):
Please add a @param for describing what wait_pipes does.
[2]
+ def tearDown(self): self.command)
+ os.unlink(
No need for this, everything created with self.makeFile will be automatically removed.
[3]
"""
The process returns the expected standard error.
"""
There's an extra blank between the docstring and the first line of the test.
[4]
+ def _write_ command( self, command):
I'd suggest to drop this and use landscape. lib.fs. create_ file instead (which maybe should be renamed write_file):
from landscape.lib.fs import create_file
def test_spawn_ process_ return_ value(self) :
create_ file(self. command, "#!/bin/sh\nexit 2")
def callback((out, err, code)):
This is because the less ad-hoc methods the test has the more readable it is.