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

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