def test_dim_exception_2d():
 def f(x, y):
  return ((x ** 2) + (y ** 2))
 with pytest.raises(ValueError) as exc:
  discretize_model(f, ((-10), 11))
 assert (exc.value.args[0] == u'y range not specified, but model is 2-d')

def test_dim_exception_2d ( ) : def f ( x , y ) : return ( ( x ** 2 ) + ( y ** 2 ) ) with pytest . raises ( ValueError ) as exc : discretize_model ( f , ( ( - 10 ) , 11 ) ) assert ( exc . value . args [ 0 ] == u'y range not specified, but model is 2-d' )
test dimension exception 2d .