def test_get_debug_values_success():
 prev_value = config.compute_test_value
 for mode in ['ignore', 'warn', 'raise']:
  try:
   config.compute_test_value = mode
   x = T.vector()
   x.tag.test_value = numpy.zeros((4,), dtype=config.floatX)
   y = numpy.zeros((5, 5))
   iters = 0
   for (x_val, y_val) in op.get_debug_values(x, y):
    assert (x_val.shape == (4,))
    assert (y_val.shape == (5, 5))
    iters += 1
   assert (iters == 1)
  finally:
   config.compute_test_value = prev_value

def test_get_debug_values_success ( ) : prev_value = config . compute_test_value for mode in [ 'ignore' , 'warn' , 'raise' ] : try : config . compute_test_value = mode x = T . vector ( ) x . tag . test_value = numpy . zeros ( ( 4 , ) , dtype = config . floatX ) y = numpy . zeros ( ( 5 , 5 ) ) iters = 0 for ( x_val , y_val ) in op . get_debug_values ( x , y ) : assert ( x_val . shape == ( 4 , ) ) assert ( y_val . shape == ( 5 , 5 ) ) iters += 1 assert ( iters == 1 ) finally : config . compute_test_value = prev_value
tests that get_debug_value returns values when available .