Skip to content

Commit a086220

Browse files
committed
TST: skip rather than xfail a few tests to address CI log pollution
When problematic tests get xfailed, they still run. In our regular CI jobs we run tests in a way that picks up the `pytest.ini` file in the root of the repo - that is used to silence noise from such tests. In the wheel build jobs, this silencing doesn't happen and hence pytest prints warnings it sees at the bottom of the test output. In the current wheel builds, this is ~2 pages of warnings. The solution is straightforward: skip these tests instead (there's not much point continuing to run them anyway). For the `f2py` tests I also tried using the `capfd` and `capsys` fixtures, as is done for other tests. However, a problem is that you must use one or the other, you can't use both. This may make it impossible to capture everything. [skip ci]
1 parent a8d4e48 commit a086220

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

numpy/_core/tests/test_numeric.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def test_dunder_round(self, dtype):
190190

191191
@pytest.mark.parametrize('val, ndigits', [
192192
pytest.param(2**31 - 1, -1,
193-
marks=pytest.mark.xfail(reason="Out of range of int32")
193+
marks=pytest.mark.skip(reason="Out of range of int32")
194194
),
195195
(2**31 - 1, 1-math.ceil(math.log10(2**31 - 1))),
196196
(2**31 - 1, -math.ceil(math.log10(2**31 - 1)))

numpy/f2py/tests/test_f2py2e.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def test_debugcapi(capfd, hello_world_f90, monkeypatch):
560560
assert r"#define DEBUGCFUNCS" in ocmod.read()
561561

562562

563-
@pytest.mark.xfail(reason="Consistently fails on CI.")
563+
@pytest.mark.skip(reason="Consistently fails on CI; noisy so skip not xfail.")
564564
def test_debugcapi_bld(hello_world_f90, monkeypatch):
565565
"""Ensures that debugging wrappers work
566566
@@ -732,7 +732,7 @@ def test_version(capfd, monkeypatch):
732732
assert np.__version__ == out.strip()
733733

734734

735-
@pytest.mark.xfail(reason="Consistently fails on CI.")
735+
@pytest.mark.skip(reason="Consistently fails on CI; noisy so skip not xfail.")
736736
def test_npdistop(hello_world_f90, monkeypatch):
737737
"""
738738
CLI :: -c

0 commit comments

Comments
 (0)