diff --git a/.github/workflows/os-blas-test-matrix.yml b/.github/workflows/os-blas-test-matrix.yml index 0e5fd25fc..f8371e387 100644 --- a/.github/workflows/os-blas-test-matrix.yml +++ b/.github/workflows/os-blas-test-matrix.yml @@ -71,8 +71,8 @@ jobs: unset | Generic | Apple ) ;; # Found in system OpenBLAS ) brew install openblas - echo "BLAS_ROOT=/usr/local/opt/openblas/" >> $GITHUB_ENV - echo "LAPACK_ROOT=/usr/local/opt/openblas/" >> $GITHUB_ENV + echo "LDFLAGS=-L/opt/homebrew/opt/openblas/lib" >> $GITHUB_ENV + echo "CPPFLAGS=-I/opt/homebrew/opt/openblas/include" >> $GITHUB_ENV ;; *) echo "bla_vendor option ${{ matrix.bla_vendor }} not supported" @@ -204,8 +204,6 @@ jobs: path: slycot-src - name: Checkout python-control uses: actions/checkout@v3 - with: - repository: 'python-control/python-control' - name: Setup Python uses: actions/setup-python@v4 with: diff --git a/control/tests/nyquist_test.py b/control/tests/nyquist_test.py index af9505354..73a4ed8b6 100644 --- a/control/tests/nyquist_test.py +++ b/control/tests/nyquist_test.py @@ -132,18 +132,17 @@ def test_nyquist_basic(): # Nyquist plot with poles on imaginary axis, omega specified # (can miss encirclements due to the imaginary poles at +/- 1j) sys = ct.tf([1], [1, 3, 2]) * ct.tf([1], [1, 0, 1]) - with pytest.warns(UserWarning, match="does not match") as records: + with warnings.catch_warnings(record=True) as records: count = ct.nyquist_response(sys, np.linspace(1e-3, 1e1, 1000)) - if len(records) == 0: - assert _Z(sys) == count + _P(sys) - - # Nyquist plot with poles on imaginary axis, omega specified, with contour - sys = ct.tf([1], [1, 3, 2]) * ct.tf([1], [1, 0, 1]) - with pytest.warns(UserWarning, match="does not match") as records: - count, contour = ct.nyquist_response( - sys, np.linspace(1e-3, 1e1, 1000), return_contour=True) - if len(records) == 0: - assert _Z(sys) == count + _P(sys) + if len(records) == 0: + # No warnings (it happens) => make sure count is correct + assert _Z(sys) == count + _P(sys) + elif len(records) == 1: + # Expected case: make sure warning is the right one + assert issubclass(records[0].category, UserWarning) + assert "encirclements does not match" in str(records[0].message) + else: + pytest.fail("multiple warnings in nyquist_response (?)") # Nyquist plot with poles on imaginary axis, return contour sys = ct.tf([1], [1, 3, 2]) * ct.tf([1], [1, 0, 1])
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: