def optimize_exception_test(self):
        """Test for exception while calling GridSearch.optimize."""
        try:
            GridSearch(SMAPE, -2).optimize(self.timeSeries)
        except ValueError:
            pass
        else:
            assert False    # pragma: no cover

        try:
            GridSearch(SMAPE, -1).optimize(self.timeSeries, [self.bfm])
        # we looped down to the NotImplemetedError of BaseMethod.execute
        except __HOLE__:
            pass
        else:
            assert False    # pragma: no cover
dataset/ETHPy150Open T-002/pycast/pycast/tests/gridsearchtest.py/GridSearchTest.optimize_exception_test