Skip to content

Commit af9bd94

Browse files
committed
ease test tolerance on timeseries
1 parent 42cba0c commit af9bd94

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

control/tests/flatsys_test.py

Lines changed: 3 additions & 2 deletions
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"):

control/tests/timeresp_test.py

Lines changed: 2 additions & 1 deletion
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):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy