#NEWLINE# def test_data_collection_combo_helper( ) : #NEWLINE# #INDENT# combo = QtGui . QComboBox ( ) #NEWLINE# dc = DataCollection ( [ ] ) #NEWLINE# helper = DataCollectionComboHelper ( combo , dc ) #NEWLINE# data1 = Data ( x = [ 1 , 2 , 3 ] , y = [ 2 , 3 , 4 ] , label = 'data1' ) #NEWLINE# dc . append ( data1 ) #NEWLINE# assert ( _items_as_string ( combo ) == 'data1' ) #NEWLINE# data1 . label = 'mydata1' #NEWLINE# assert ( _items_as_string ( combo ) == 'mydata1' ) #NEWLINE# dc . remove ( data1 ) #NEWLINE# assert ( _items_as_string ( combo ) == '' )