def test_complex_step_around_newton_error(self):

        prob = Problem()
        prob.root = SellarDerivativesGrouped()

        prob.root.fd_options['force_fd'] = True
        prob.root.fd_options['form'] = 'complex_step'

        prob.root.mda.nl_solver = Newton()

        with self.assertRaises(RuntimeError) as cm:
            prob.setup(check=False)

        msg = "The solver in 'mda' requires derivatives. We "
        msg += "currently do not support complex step around it."

        self.assertTrue(str(cm.exception) in msg)
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/core/test/test_complex_step.py/ComplexStepVectorUnitTestsBasicImpl.test_complex_step_around_newton_error/swapped operands of `in`