Unverified Commit 550515e6 authored by Tom Hunze's avatar Tom Hunze
Browse files

python3Packages.plotly: fix test collection with pytest 9

`pytest_ignore_collect` takes only `collection_path` starting with
pytest 9 [1]. Most of the paths referenced in `plotly/conftest.py`
don't exist anymore and wouldn't be collected anyway, so we can just
remove the file.

Upstream PR: https://github.com/plotly/plotly.py/pull/5521

[1] https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
parent cb3f6fad
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -52,6 +52,14 @@ buildPythonPackage rec {
    substituteInPlace pyproject.toml \
      --replace-fail '"hatch", ' "" \
      --replace-fail "jupyter_packaging~=0.10.0" jupyter_packaging

    # `pytest_ignore_collect` takes only `collection_path` starting with
    # pytest 9. Most of the paths referenced in `plotly/conftest.py`
    # don't exist anymore and wouldn't be collected anyway, so we can just
    # remove the file.
    # https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
    # Upstream PR: https://github.com/plotly/plotly.py/pull/5521
    rm plotly/conftest.py
  '';

  env.SKIP_NPM = true;