#NEWLINE# def test_new_data_defaults( self ) : #NEWLINE# #INDENT# from glue.config import qt_client #NEWLINE# with patch ( 'glue.app.qt.application.pick_class' ) as pc : #NEWLINE# #INDENT# pc . return_value = None #NEWLINE# d2 = Data ( x = np . array ( [ [ 1 , 2 , 3 ] , [ 4 , 5 , 6 ] ] ) ) #NEWLINE# d1 = Data ( x = np . array ( [ 1 , 2 , 3 ] ) ) #NEWLINE# self . app . choose_new_data_viewer ( data = d1 ) #NEWLINE# ( args , kwargs ) = pc . call_args #NEWLINE# assert ( qt_client . members [ kwargs [ 'default' ] ] == ScatterWidget ) #NEWLINE# self . app . choose_new_data_viewer ( data = d2 ) #NEWLINE# ( args , kwargs ) = pc . call_args #NEWLINE# assert ( qt_client . members [ d1 [ 'default' ] ] == ImageWidget )