

def test_golden_search_exceptions(self):
    invalid_parameters = (dict(tol=(- 1)), dict(minstep=(- 1)), dict(maxstep=(- 1)), dict(maxiter=(- 1)), dict(tol=0), dict(minstep=0), dict(maxstep=0), dict(maxiter=0))
    for params in invalid_parameters:
        with self.assertRaises(ValueError):
            fmin_golden_search((lambda x: x), **params)
    with self.assertRaises(ValueError):
        fmin_golden_search((lambda x: x), minstep=10, maxstep=1)

dataset/ETHPy150Open itdxer/neupy/tests/optimizations/test_golden_search.py GoldenSearchTestCase.test_golden_search_exceptions/original