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

pytest 8 compatibility #60

Closed
jab opened this issue Feb 1, 2024 · 2 comments · Fixed by #59
Closed

pytest 8 compatibility #60

jab opened this issue Feb 1, 2024 · 2 comments · Fixed by #59

Comments

@jab
Copy link

jab commented Feb 1, 2024

Currently using the latest release of pytest-sphinx (0.5.0) with the latest release of pytest (8.0) breaks with errors like

_____________________ ERROR collecting bidict/__init__.py ______________________
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pytest_sphinx.py:499: in collect
    optionflags = _pytest.doctest.get_optionflags(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/_pytest/doctest.py:404: in get_optionflags
    optionflags_str = config.getini("doctest_optionflags")
E   AttributeError: 'SphinxDoctestModule' object has no attribute 'getini'

I'm not very familiar with what's changed in pytest 8, but I did find that the https://docs.pytest.org/en/stable/changelog.html#other-breaking-changes docs mention config.getini where they talk about a breaking change to parser.addini, in case that's a clue.

@twmr
Copy link
Owner

twmr commented Feb 3, 2024

Thx for the report @jab! The unit-tests now pass again with the fixes from #59. Please let me now if there any further issues with pytest8, that were not detected by the unit-tests.

@jab
Copy link
Author

jab commented Feb 3, 2024

LGTM, thanks @Thisch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants