diff --git a/mark-network-tests.patch b/mark-network-tests.patch new file mode 100644 index 0000000..3c5f30b --- /dev/null +++ b/mark-network-tests.patch @@ -0,0 +1,37 @@ +--- + setup.cfg | 2 ++ + tests/test_multichannel.py | 1 + + tests/test_util.py | 1 + + 3 files changed, 4 insertions(+) + +--- a/setup.cfg ++++ b/setup.cfg +@@ -14,6 +14,8 @@ addopts = --mpl --mpl-baseline-path=tes + filterwarnings = + ignore::DeprecationWarning:audioread.* + ignore::DeprecationWarning:resampy.* ++markers = ++ network: tests requiring network connection + + [flake8] + count = True +--- a/tests/test_multichannel.py ++++ b/tests/test_multichannel.py +@@ -914,6 +914,7 @@ def test_click_multi(): + assert np.allclose(yout[..., 2000:2100], click) + + ++@pytest.mark.network + def test_nnls_multi(s_multi): + + # Verify that a stereo melspectrogram can be reconstructed +--- a/tests/test_util.py ++++ b/tests/test_util.py +@@ -1396,6 +1396,7 @@ def test_cite_badversion(): + librosa.cite(version="-1.5") + + ++@pytest.mark.network + @pytest.mark.xfail(raises=librosa.ParameterError) + def test_cite_unreleased(): + librosa.cite("0.10.0.dev0") diff --git a/python-librosa.changes b/python-librosa.changes index 2b06dc1..f251d0d 100644 --- a/python-librosa.changes +++ b/python-librosa.changes @@ -5,6 +5,8 @@ Wed Oct 2 20:59:35 UTC 2024 - Matej Cepl the most recent version of SciPy (gh#librosa/librosa#1849). - Add sysinfo.py to provide upstream with the required debugging information. +- Add mark-network-tests.patch marking tests which require + network connection to run. ------------------------------------------------------------------- Fri Sep 20 22:12:01 UTC 2024 - Matej Cepl diff --git a/python-librosa.spec b/python-librosa.spec index dc37fdf..121d718 100644 --- a/python-librosa.spec +++ b/python-librosa.spec @@ -35,6 +35,9 @@ Source20: sysinfo.py # PATCH-FIX-UPSTREAM csr_matrix-attr-H.patch gh#librosa/librosa#1849 mcepl@suse.com # csr_matrix.H in scipy has been removed Patch0: csr_matrix-attr-H.patch +# PATCH-FIX-UPSTREAM mark-network-tests.patch mcepl@suse.com +# to skip test which require network access +Patch1: mark-network-tests.patch BuildRequires: %{python_module SoundFile >= 0.12.1} BuildRequires: %{python_module audioread >= 2.1.9} BuildRequires: %{python_module base >= 3.7} @@ -153,8 +156,10 @@ notparallel+=" or test_zero_crossings" donttest+=" or test_beat" # gh#librosa/librosa#1880 donttest+=" or test_nnls_multiblock" -%pytest -k "not (${donttest} or ${notparallel})" -n auto -%pytest -k "not (${donttest}) and (${notparallel})" +# +donttest+=" or test_subsegment_badn" +%pytest -k "not (${donttest} or ${notparallel} or network)" -n auto +%pytest -k "not (${donttest} or network) and (${notparallel})" %files %{python_files} %doc AUTHORS.md README.md