File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -720,6 +720,32 @@ impl DummyArkFrontend {
720720 }
721721 }
722722
723+ /// Receive from IOPub and assert DisplayData message, returning the
724+ /// display_id from the transient field.
725+ /// Automatically skips any Stream messages.
726+ #[ track_caller]
727+ pub fn recv_iopub_display_data_id ( & self ) -> String {
728+ let msg = self . recv_iopub_next ( ) ;
729+ match msg {
730+ Message :: DisplayData ( data) => data. content . transient [ "display_id" ]
731+ . as_str ( )
732+ . expect ( "display_id should be a string" )
733+ . to_string ( ) ,
734+ other => panic ! ( "Expected DisplayData, got {:?}" , other) ,
735+ }
736+ }
737+
738+ /// Receive from IOPub and assert UpdateDisplayData message.
739+ /// Automatically skips any Stream messages.
740+ #[ track_caller]
741+ pub fn recv_iopub_update_display_data ( & self ) {
742+ let msg = self . recv_iopub_next ( ) ;
743+ match msg {
744+ Message :: UpdateDisplayData ( _) => { } ,
745+ other => panic ! ( "Expected UpdateDisplayData, got {:?}" , other) ,
746+ }
747+ }
748+
723749 /// Receive from IOPub and assert CommMsg message.
724750 /// Automatically skips any Stream messages.
725751 #[ track_caller]
You can’t perform that action at this time.
0 commit comments