#NEWLINE# def test_buffer_with_count_basic( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 100 , 1 ) , on_next ( 210 , 2 ) , on_next ( 240 , 3 ) , on_next ( 280 , 4 ) , on_next ( 320 , 5 ) , on_next ( 350 , 6 ) , on_next ( 380 , 7 ) , on_next ( 420 , 8 ) , on_next ( 470 , 9 ) , on_completed ( 600 ) ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# return xs . buffer_with_count ( 3 , 2 ) . map ( ( lambda x : str ( x ) ) ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_next ( 280 , str ( [ 2 , 3 , 4 ] ) ) , on_next ( 350 , str ( [ 4 , 5 , 6 ] ) ) , on_next ( 420 , str ( [ 6 , 7 , 8 ] ) ) , on_next ( 600 , str ( [ 8 , 9 ] ) ) , on_completed ( 600 ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 600 ) )