#NEWLINE# def test__quantity_force_units( self ) : #NEWLINE# #INDENT# name = 'test__quantity' #NEWLINE# datatype = np . ndarray #NEWLINE# dim = 2 #NEWLINE# units = pq . ohm #NEWLINE# size = [ ] #NEWLINE# for i in range ( int ( dim ) ) : #NEWLINE# #INDENT# size . append ( ( np . random . randint ( 5 ) + 1 ) ) #NEWLINE# #UNINDENT# targ = pq . Quantity ( ( np . random . random ( size ) * 1000 ) , units = units ) #NEWLINE# res = get_fake_value ( name , targ , dim = dim , seed = 0 , units = units ) #NEWLINE# self . assertTrue ( isinstance ( res , np . ndarray ) ) #NEWLINE# assert_arrays_equal ( targ , res )