Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests which use the sphinx_run fixture are broken for sphinx>7; failing CI results #545

Closed
peytondmurray opened this issue Sep 26, 2023 · 1 comment · Fixed by #546
Closed
Labels
bug Something isn't working

Comments

@peytondmurray
Copy link
Contributor

peytondmurray commented Sep 26, 2023

Context

Currently, tests are failing on CI:

image

Expectation

Tests should pass.

Bug

The tests are failing with the following message:

==================================== ERRORS ====================================
_____________________ ERROR at setup of test_codecell_file _____________________
file /home/runner/work/MyST-NB/MyST-NB/tests/test_codecell_file.py, line 6
  @pytest.mark.sphinx_params(
      "mystnb_codecell_file.md",
      conf={"nb_execution_mode": "cache", "source_suffix": {".md": "myst-nb"}},
  )
  def test_codecell_file(sphinx_run, file_regression, check_nbs, get_test_path):
file /home/runner/work/MyST-NB/MyST-NB/tests/conftest.py, line 150
  @pytest.fixture()
  def sphinx_run(sphinx_params, make_app, tempdir):
E       fixture 'tempdir' not found
>       available fixtures: _shared_result_cache, anyio_backend, anyio_backend_name, anyio_backend_options, app, app_params, build_matplotlib_font_cache, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, check_nbs, clean_doctree, cov, data_regression, datadir, dataframe_regression, doctest_namespace, file_regression, get_test_path, if_graphviz_found, image_regression, make_app, monkeypatch, ndarrays_regression, no_cover, num_regression, original_datadir, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, rollback_sysmodules, rootdir, shared_datadir, shared_result, sphinx_params, sphinx_run, sphinx_test_tempdir, status, test_params, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, warning
>       use 'pytest --fixtures [testpath]' for help on them.

This happens because the sphinx_run fixture provided by myst-nb relies on a tempdir fixture provided by Sphinx that appears to have been removed some time between 6.2.1 and 7.2.6.

Problem

This is a problem because this seems to be a release blocker, and as such it is blocking people from upgrading sphinx:

Reproduce the bug

  1. Clone the repo
  2. pip install .[testing]
  3. pytest

List your environment

This is currently affecting environments with python>3.8.

@peytondmurray peytondmurray added the bug Something isn't working label Sep 26, 2023
@welcome
Copy link

welcome bot commented Sep 26, 2023

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant