def test_drivesim(cardir): cmd = ['donkey', 'createcar', '--path', cardir ,'--template', 'square'] out, err, proc_id = utils.run_shell_command(cmd, timeout=10) cmd = ['python', 'manage.py', 'drive'] out, err, proc_id = utils.run_shell_command(cmd, cwd = cardir) print(err) """
def test_drivesim(cardir): cmd = ['donkey', 'createcar', '--path', cardir ,'--template', 'square'] out, err, proc_id = utils.run_shell_command(cmd, timeout=10) cmd = ['python', 'manage.py', 'drive'] out, err, proc_id = utils.run_shell_command(cmd, cwd=cardir) print(err) if is_error(err) is True: print('out', out) print('error: ', err) raise ValueError(err)
def test_bad_command_fails(): cmd = ['donkey', 'not a comand'] out, err, proc_id = utils.run_shell_command(cmd) print(err) print(out) assert is_error(err) is True
def test_createcar(cardir): cmd = ['donkey', 'createcar', '--path', cardir] out, err, proc_id = utils.run_shell_command(cmd) assert is_error(err) is False