b.t.s.ScriptRunner(object) : class documentation

Part of bzrlib.tests.script View In Hierarchy

Run a shell-like script from a test.

Can be used as:

from bzrlib.tests import script

...

def test_bug_nnnnn(self):
sr = script.ScriptRunner() sr.run_script(self, ''' $ bzr init $ bzr do-this # Boom, error ''')
Method __init__ Undocumented
Method run_script Run a shell-like script as a test.
Method run_command Undocumented
Method do_bzr Undocumented
Method do_cat Undocumented
Method do_echo Undocumented
Method do_cd Undocumented
Method do_mkdir Undocumented
Method do_rm Undocumented
Method do_mv Undocumented
Method _check_output Undocumented
Method _pre_process_args Undocumented
Method _read_input Undocumented
Method _write_output Undocumented
Method _get_jail_root Undocumented
Method _ensure_in_jail Undocumented
def __init__(self):
Undocumented
def run_script(self, test_case, text, null_output_matches_anything=False):
Run a shell-like script as a test.
Parameterstest_caseA TestCase instance that should provide the fail(), assertEqualDiff and _run_bzr_core() methods as well as a 'test_dir' attribute used as a jail root.
textA shell-like script (see _script_to_commands for syntax).
null_output_matches_anythingFor commands with no specified output, ignore any output that does happen, including output on standard error.
def run_command(self, test_case, cmd, input, output, error):
Undocumented
def _check_output(self, expected, actual, test_case):
Undocumented
def _pre_process_args(self, args):
Undocumented
def _read_input(self, input, in_name):
Undocumented
def _write_output(self, output, out_name, out_mode):
Undocumented
def do_bzr(self, test_case, input, args):
Undocumented
def do_cat(self, test_case, input, args):
Undocumented
def do_echo(self, test_case, input, args):
Undocumented
def _get_jail_root(self, test_case):
Undocumented
def _ensure_in_jail(self, test_case, path):
Undocumented
def do_cd(self, test_case, input, args):
Undocumented
def do_mkdir(self, test_case, input, args):
Undocumented
def do_rm(self, test_case, input, args):
Undocumented
def do_mv(self, test_case, input, args):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.