#NEWLINE# def test_to_set_completed( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 110 , 1 ) , on_next ( 220 , 2 ) , on_next ( 330 , 3 ) , on_next ( 440 , 4 ) , on_next ( 550 , 5 ) , on_completed ( 660 ) ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# return xs . to_set ( ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_next ( 660 , set ( [ 2 , 3 , 4 , 5 ] ) ) , on_completed ( 660 ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 660 ) )