<div dir="ltr">I have just extracted the 'shell-like tests' library from bzr's test library. example:<div><br style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px"><span style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px"> def test_echo(self):</span><br style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px">
<span style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px"> run_script(self, """</span><br style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px">
<span style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px"> $ echo hello world</span><br style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px">
<span style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px"> hello world</span><br style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px">
<span style="color:rgb(64,64,64);font-family:Roboto,arial,sans-serif;font-size:13px;line-height:18px"> """)</span></div><div><font color="#404040" face="Roboto, arial, sans-serif"><span style="line-height:18px"><br>
</span></font></div><div><font color="#404040" face="Roboto, arial, sans-serif"><span style="line-height:18px">This library makes it easy to write integration tests for programs with a command-line interface: you just give the command and the expected output. The command can be run as an in-process Python call, to let you precisely control its environment through mocks etc. This style also makes it pretty easy for new contributors to add tests.</span></font></div>
<div><div><br></div><div><a href="https://github.com/sourcefrog/shellliketests">https://github.com/sourcefrog/shellliketests</a><br clear="all"><div><br></div>-- <br>Martin<br>
</div></div></div>