diff --git a/.github/workflows/os-blas-test-matrix.yml b/.github/workflows/os-blas-test-matrix.yml index fede19025..4470e2454 100644 --- a/.github/workflows/os-blas-test-matrix.yml +++ b/.github/workflows/os-blas-test-matrix.yml @@ -251,7 +251,9 @@ jobs: pip install slycot-wheels/${{ matrix.packagekey }}/slycot*.whl pip show slycot - name: Test with pytest - run: pytest -v control/tests + run: JOBNAME="$JOBNAME" pytest control/tests + env: + JOBNAME: wheel ${{ matrix.packagekey }} ${{ matrix.blas_lib }} test-conda: @@ -318,6 +320,6 @@ jobs: mamba install -c ./slycot-conda-pkgs slycot conda list - name: Test with pytest - run: JOBNAME=$JOBNAME pytest control/tests + run: JOBNAME="$JOBNAME" pytest control/tests env: - JOBNAME: ${{ matrix.packagekey }} ${{ matrix.blas_lib }} + JOBNAME: conda ${{ matrix.packagekey }} ${{ matrix.blas_lib }} diff --git a/control/descfcn.py b/control/descfcn.py index 149db1bd2..9adcc5dd1 100644 --- a/control/descfcn.py +++ b/control/descfcn.py @@ -74,7 +74,7 @@ def _f(self, x): def describing_function( F, A, num_points=100, zero_check=True, try_method=True): - """Numerical compute the describing function of a nonlinear function + """Numerically compute the describing function of a nonlinear function The describing function of a nonlinearity is given by magnitude and phase of the first harmonic of the function when evaluated along a sinusoidal diff --git a/control/tests/flatsys_test.py b/control/tests/flatsys_test.py index 4d4c8cf6b..196cddbd2 100644 --- a/control/tests/flatsys_test.py +++ b/control/tests/flatsys_test.py @@ -210,7 +210,8 @@ def test_kinematic_car_ocp( pytest.xfail("precision loss in some configurations") elif re.match("Iteration limit.*", traj_ocp.message) and \ - re.match("ubuntu-3.* Generic", os.getenv('JOBNAME')) and \ + re.match( + "conda ubuntu-3.* Generic", os.getenv('JOBNAME', '')) and \ np.__version__ == '1.24.0': pytest.xfail("gh820: iteration limit exceeded") diff --git a/control/tests/optimal_test.py b/control/tests/optimal_test.py index c76859dfc..53f2c29ad 100644 --- a/control/tests/optimal_test.py +++ b/control/tests/optimal_test.py @@ -626,7 +626,7 @@ def final_point_eval(x, u): ('collocation', 5, 'u0', 'endpoint'), ('collocation', 5, 'input', 'openloop'),# open loop sim fails ('collocation', 10, 'input', None), - ('collocation', 10, 'u0', None), # from documenentation + ('collocation', 10, 'u0', None), # from documentation ('collocation', 10, 'state', None), ('collocation', 20, 'state', None), ]) @@ -716,9 +716,11 @@ def vehicle_output(t, x, u, params): # Make sure we started and stopped at the right spot if fail == 'endpoint': + assert not np.allclose(result.states[:, -1], xf, rtol=1e-4) pytest.xfail("optimization does not converge to endpoint") else: np.testing.assert_almost_equal(result.states[:, 0], x0, decimal=4) + np.testing.assert_almost_equal(result.states[:, -1], xf, decimal=2) # Simulate the trajectory to make sure it looks OK resp = ct.input_output_response( diff --git a/control/timeresp.py b/control/timeresp.py index da158e0cc..509107cc8 100644 --- a/control/timeresp.py +++ b/control/timeresp.py @@ -642,7 +642,7 @@ def __len__(self): # Convert to pandas def to_pandas(self): if not pandas_check(): - ImportError('pandas not installed') + raise ImportError("pandas not installed") import pandas # Create a dict for setting up the data frame 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