diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f6cf72..efbf5f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest ] + os: [ ubuntu-latest, macOS-latest ] python-version: [ '3.10' ] include: - os: ubuntu-latest @@ -36,12 +36,16 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Ubuntu - install libsndfile + - name: Ubuntu - install audio packages run: | sudo apt-get update sudo apt-get install --no-install-recommends --yes libsndfile1 ffmpeg sox libavcodec-extra if: matrix.os == 'ubuntu-latest' + - name: OSX - install audio packages + run: brew install ffmpeg mediainfo + if: matrix.os == 'macOS-latest' + - name: Install package run: | python -m pip install --upgrade pip diff --git a/tests/test_transform_pink_noise.py b/tests/test_transform_pink_noise.py index 8962631..4a34ee3 100644 --- a/tests/test_transform_pink_noise.py +++ b/tests/test_transform_pink_noise.py @@ -71,8 +71,6 @@ def test_pink_noise(duration, sampling_rate, gain_db, snr_db): expected_volume, decimal=1, ) - np.testing.assert_array_equal( - noise, - expected_noise, - strict=True, - ) + assert noise.shape == expected_noise.shape + assert noise.dtype == expected_noise.dtype + np.testing.assert_almost_equal(noise, expected_noise)