#NEWLINE# @ pytest . mark . parametrize ( 'value' , [ 'string' , object ( ) , 1.0 , [ 1 , 2 , 3 ] ] ) #NEWLINE# def test_central_spectral_coord_invalid_type( value ) : #NEWLINE# #INDENT# f = Filter ( ) #NEWLINE# with pytest . raises ( TypeError ) as exc : #NEWLINE# #INDENT# f . central_spectral_coord = value #NEWLINE# #UNINDENT# assert ( exc . value . args [ 0 ] == 'spectral_coord should be given as a Quantity object' )