python-docx elements don't support xpath() with namespaces kwarg.
The calls silently failed in try/except blocks, causing chapter search
and heading detection to never find matches.
Fixed by replacing xpath(..., namespaces={...}) with:
- findall('.//' + qn('w:t')) for text elements
- find(qn('w:pPr')) + find(qn('w:pStyle')) for style detection
- get(qn('w:val')) for attribute values
Also fixed logic bug where elif prevented short-text fallback from
running when a non-heading style existed on the paragraph.
18 lines
347 B
JSON
18 lines
347 B
JSON
{
|
|
"metadata": {
|
|
"start_time": "2026-01-11T05:19:25.816074",
|
|
"pytest_version": "9.0.2",
|
|
"end_time": "2026-01-11T05:19:26.468770",
|
|
"duration": 0.6526906490325928,
|
|
"exit_status": 0
|
|
},
|
|
"summary": {
|
|
"total": 0,
|
|
"passed": 0,
|
|
"failed": 0,
|
|
"skipped": 0,
|
|
"pass_rate": 0
|
|
},
|
|
"categories": {},
|
|
"tests": []
|
|
} |