def test(): remote_client = RemoteClient(ip="127.0.0.1", local_dir=str(tmpdir)) yield remote_client._start() out, err = yield _submit("127.0.0.1:{0}".format(remote_client.port), str(valid_python_script)) assert b"hello world!" in out yield remote_client._close()
def test(): remote_client = RemoteClient(ip='127.0.0.1', local_dir=str(tmpdir)) yield remote_client._start() out, err = yield _submit('127.0.0.1:{0}'.format(remote_client.port), str(invalid_python_script)) assert b'Traceback' in err yield remote_client._close()
def f(): stdout, stderr = yield _submit(remote_client_address, filepath) if stdout: sys.stdout.write(str(stdout)) if stderr: sys.stderr.write(str(stderr))