From 5a4d6a7e64da0e299abacb352ddff183b68d9546 Mon Sep 17 00:00:00 2001 From: Scott Staniewicz Date: Thu, 18 Jul 2024 12:41:33 -0400 Subject: [PATCH] fix `filterwarnings` regex --- tests/test_cslc.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_cslc.py b/tests/test_cslc.py index a4d5c43..6b54a52 100644 --- a/tests/test_cslc.py +++ b/tests/test_cslc.py @@ -22,6 +22,14 @@ ) +pytestmark = pytest.mark.filterwarnings( + # h5py: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. + # Please use `prod` instead.:DeprecationWarning:h5py/_hl/dataset.py + "ignore:.*product.*:DeprecationWarning", + "ignore:.*invalid value encountered.*:RuntimeWarning", +) + + def test_file_regex(): filename = ( "OPERA_L2_CSLC-S1_T113-241377-IW2_20240716T105712Z_20240717T073255Z_S1A_VV_v1.1" @@ -66,14 +74,6 @@ def test_file_regex(): assert result == expected -pytestmark = pytest.mark.filterwarnings( - # h5py: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. - # Please use `prod` instead.:DeprecationWarning:h5py/_hl/dataset.py - "ignore:.*product.*:DeprecationWarning", - "ignore:invalid value encountered in intersection:RuntimeWarning", -) - - def test_get_radar_wavelength(): wvl = get_radar_wavelength(TEST_FILE) assert wvl == 0.05546576