From 437ebeef7fcc6d792a7f3f5bb9309f8ef806e5cf Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Fri, 13 Sep 2024 13:52:37 +1200 Subject: [PATCH] Use non-interactive Agg matplotlib backend; try tune test --- .github/workflows/tests.yml | 10 +++++++--- tests/test_modflow.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fd5db99..036d044 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,10 @@ jobs: # pick lower and upper versions only python-version: ["3.9", "3.12"] + env: + # Use a non-interactive matplotlib backend + MPLBACKEND: Agg + steps: - uses: actions/checkout@v4 @@ -41,9 +45,9 @@ jobs: - name: Run tests with required packages run: pytest -v --cov - - name: Install PyQt5 for macOS - if: matrix.os == 'macos-latest' - run: pip install PyQt5 + # - name: Install PyQt5 for macOS + # if: matrix.os == 'macos-latest' + # run: pip install PyQt5 - name: Run tests with optional packages run: | diff --git a/tests/test_modflow.py b/tests/test_modflow.py index 38b397a..637adc7 100644 --- a/tests/test_modflow.py +++ b/tests/test_modflow.py @@ -1957,7 +1957,7 @@ def test_flopy_package_period(tmp_path): ], np.float32, ) - np.testing.assert_almost_equal(dl["q"], expected_q) + np.testing.assert_allclose(dl["q"], expected_q) assert "RLEN" not in dl.dtype.names assert "RLEN".ljust(16) not in dl.dtype.names