sendShellRequest sends a message to the kernel over the shell channel. Upon error, sendShellRequest will Fail the test.
(t *testing.T, request ComposedMsg)
| 375 | // sendShellRequest sends a message to the kernel over the shell channel. Upon error, sendShellRequest |
| 376 | // will Fail the test. |
| 377 | func (client *testJupyterClient) sendShellRequest(t *testing.T, request ComposedMsg) { |
| 378 | t.Helper() |
| 379 | |
| 380 | var ( |
| 381 | frames [][]byte |
| 382 | err error |
| 383 | ) |
| 384 | |
| 385 | frames = append(frames, []byte("<IDS|MSG>")) |
| 386 | |
| 387 | reqMsgParts, err := request.ToWireMsg([]byte(connectionKey)) |
| 388 | if err != nil { |
| 389 | t.Fatalf("\t%s request.ToWireMsg: %s", failure, err) |
| 390 | } |
| 391 | frames = append(frames, reqMsgParts...) |
| 392 | |
| 393 | if err = client.shellSocket.SendMulti(zmq4.NewMsgFrom(frames...)); err != nil { |
| 394 | t.Fatalf("\t%s shellSocket.SendMessage: %s", failure, err) |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | // recvShellReply tries to read a reply message from the shell channel. It will timeout after the given |
| 399 | // timeout delay. Upon error or timeout, recvShellReply will Fail the test. |
no test coverage detected