Skip to content

Fix test_model.py::test_modules failing with Comsol 6.4#252

Merged
john-hen merged 3 commits into
MPh-py:mainfrom
john-hen:fix_test_modules_failing_comsol64
May 21, 2026
Merged

Fix test_model.py::test_modules failing with Comsol 6.4#252
john-hen merged 3 commits into
MPh-py:mainfrom
john-hen:fix_test_modules_failing_comsol64

Conversation

@john-hen

Copy link
Copy Markdown
Collaborator

The test test_modules() in test_model.py was failing with Comsol 6.4, probably because that Comsol version no longer ships with the "Optimization" module that we were querying. I just excluded that from the test.

john-hen added 3 commits May 21, 2026 20:57
The test `test_modules()` in `test_model.py` was failing with
Comsol 6.4, probably because that Comsol version no longer ships with
the "Optimization" module that we were querying. I just excluded that
from the test.
This seems to be a new addition to Ruff's linter rules that flagged line
408 in `test_model.py`. The test passes regardless, so excluded the
rule.
Our custom Sphinx extension `myst_docstring`, which lets us write
doc-strings in Markdown instead of reStructuredText, is not compatible
with Sphinx 9, for which the Autodoc extension "has been substantially
rewritten, and there may be some incompatible changes in edge cases,
especially when extensions interact with autodoc internals."

See the release notes:
https://www.sphinx-doc.org/en/master/changes/9.0.html#release-9-0-0-released-nov-30-2025

That's exactly what our extension does though. The mitigation
recommended in the release notes, to set
`autodoc_use_legacy_class_based = True` in `conf.py` does not seem to
help.
@john-hen
john-hen merged commit 2581ac3 into MPh-py:main May 21, 2026
5 checks passed
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 this pull request may close these issues.

1 participant