Merge pull request #659 from bnavigator/easetol · python-control/python-control@b61f58d

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -339,8 +339,9 @@ def test_point_to_point_errors(self):

339339

traj_kwarg = fs.point_to_point(

340340

flat_sys, timepts, x0, u0, xf, uf, cost=cost_fcn,

341341

basis=fs.PolyFamily(8), minimize_kwargs={'method': 'slsqp'})

342-

np.testing.assert_almost_equal(

343-

traj_method.eval(timepts)[0], traj_kwarg.eval(timepts)[0])

342+

np.testing.assert_allclose(

343+

traj_method.eval(timepts)[0], traj_kwarg.eval(timepts)[0],

344+

atol=1e-5)

344345
345346

# Unrecognized keywords

346347

with pytest.raises(TypeError, match="unrecognized keyword"):

Original file line numberDiff line numberDiff line change

@@ -681,7 +681,8 @@ def test_forced_response_T_U(self, tsystem, fr_kwargs, refattr):

681681

fr_kwargs['X0'] = tsystem.X0

682682

t, y = forced_response(tsystem.sys, **fr_kwargs)

683683

np.testing.assert_allclose(t, tsystem.t)

684-

np.testing.assert_allclose(y, getattr(tsystem, refattr), rtol=1e-3)

684+

np.testing.assert_allclose(y, getattr(tsystem, refattr),

685+

rtol=1e-3, atol=1e-5)

685686
686687

@pytest.mark.parametrize("tsystem", ["siso_ss1"], indirect=True)

687688

def test_forced_response_invalid_c(self, tsystem):