_____________________ test_compute_with_progress[0.2-True] _____________________
│ [gw0] linux -- Python 3.12.13 $PREFIX/bin/python3.12
│ capsys = <_pytest.capture.CaptureFixture object at 0x7fa83b3ae1b0>
│ caplog = <_pytest.logging.LogCaptureFixture object at 0x7fa854076c00>
│ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fa854077080>
│ use_distributed = True, interval = 0.2
│ @pytest.mark.parametrize("use_distributed", [False, True])
│ @pytest.mark.parametrize("interval", [-1, 0.0, 0.2])
│ def test_compute_with_progress(
│ capsys,
│ caplog,
│ monkeypatch,
│ use_distributed,
│ interval,
│ ):
│ caplog.set_level(logging.INFO)
│ if use_distributed:
│ client = distributed.Client(n_workers=1, threads_per_worker=1)
│ else:
│ client = None
│
│ monkeypatch.setitem(_dask_progress.CFG, "max_parallel_tasks", 1)
│ monkeypatch.setitem(
│ _dask_progress.CFG["logging"],
│ "log_progress_interval",
│ f"{interval}s" if interval > 0 else interval,
│ )
│
│ def func(delay: float) -> None:
│ time.sleep(delay)
│
│ delayeds = [dask.delayed(func)(0.11)]
│ _dask_progress._compute_with_progress(delayeds, description="test")
│ if interval == 0.0: # noqa: SIM108
│ # Assert that some progress bar has been written to stdout.
│ progressbar = capsys.readouterr().out
│ else:
│ # Assert that some progress bar has been logged.
│ progressbar = caplog.text
│ if interval < 0.0:
│ assert not progressbar
│ else:
│ > assert "100%" in progressbar
│ E AssertionError: assert '100%' in ''
│ tests/unit/preprocessor/test_dask_progress.py:49: AssertionError
See the log from the conda-build of the RC1 for v2.15: https://github.com/conda-forge/esmvalcore-feedstock/actions/runs/27945736803/job/82689853588
Not entirely sure what's going on there, @bouweandela any clues?