-
Notifications
You must be signed in to change notification settings - Fork 147
Description
@ehogan and myself have been trying to create a community environment for the new version of ESMValTool but are running into problems with pytest. Has anyone else encountered similar?
Here is a recreation of the problems encountered, using the installation instructions from https://docs.esmvaltool.org/en/latest/quickstart/installation.html
Steps:
mkdir fresh_copy_esmvaltool
cd fresh_copy_esmvaltool
git clone git@github.com:ESMValGroup/ESMValTool.git
cd ESMValTool
git checkout v2.13.0
conda env create --name fresh-esmvaltool-2.13.0 --file environment.yml
conda activate fresh-esmvaltool-2.13.0
pip install --no-deps --editable '.[develop]'
Problem:
pytest
Crashes.
Investigation:
pytest tests/unit/test_recipes.py
388 tests pass
pytest tests/unit/
Collects 205 then crashes
pytest --debug
Produced ~3500 lines
So we tried commenting things out in pyproject.toml:

pytest --debug
Collects 19 items then crashes
pytestdebug.log produced ~32000 lines
After looking in the log, we added in "--ignore=tests/sample_data",
pytest --debug
Collects 424 items then crashes
pytestdebug.log still produced ~32000 lines
It seems from the logs that something is trying to load cubes:

Is this expected behaviour? Can anyone point me in the right direction?
Among the many things tried before this (hopefully minimal) "fresh" example above were specifying the pytest version to be 8.4.0, and specifying python 3.12.0 (based on old environments having been able to run the tests). Neither had any effect that I could see.
Addition:
To work out if it was just something in the tests/unit directory causing the problem, I tried with tests/integration and it still crashed, albeit after actually running some tests:
