You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🧪 Convert normalize_doctree_xml to pytest fixture (#1090)
Converted `normalize_doctree_xml` from a standalone
function to a pytest fixture. Tests no longer need to import it - they
can now use it directly as a fixture parameter.
### Changes Made
- [x] Converted `normalize_doctree_xml` to a pytest fixture in
`tests/conftest.py`
- Added `@pytest.fixture` decorator
- Wrapped implementation in a callable that returns the normalize
function
- Maintains the same functionality and signature
- [x] Removed all imports of `normalize_doctree_xml` across test files
(9 files)
- [x] Updated all test functions to accept `normalize_doctree_xml` as a
fixture parameter
- 8 test files updated
- Multiple test functions per file updated
- [x] Applied ruff formatting to fix pre-commit issues
- Properly formatted long function signatures across multiple lines
- [x] All tests passing successfully
### Files Modified
1. `tests/conftest.py` - Converted function to fixture, applied
formatting
2. `tests/test_sphinx/conftest.py` - Removed import, added fixture
parameter to `get_sphinx_app_doctree`
3. `tests/test_html/test_html_to_nodes.py` - Removed import, added
fixture parameter
4. `tests/test_renderers/test_fixtures_docutils.py` - Removed import,
added fixture parameter to 5 test functions, applied formatting
5. `tests/test_renderers/test_myst_refs.py` - Removed import, added
fixture parameter
6. `tests/test_renderers/test_myst_config.py` - Removed import, added
fixture parameter
7. `tests/test_renderers/test_include_directive.py` - Removed import,
added fixture parameter
8. `tests/test_renderers/test_fixtures_sphinx.py` - Removed import,
added fixture parameter to 11 test functions, applied formatting
9. `tests/test_sphinx/test_sphinx_builds.py` - Removed import, added
fixture parameter
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
0 commit comments