MCPcopy
hub / github.com/microsoft/markitdown / test_docx_equations

Function test_docx_equations

packages/markitdown/tests/test_module_misc.py:264–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

262
263
264def test_docx_equations() -> None:
265 markitdown = MarkItDown()
266 docx_file = os.path.join(TEST_FILES_DIR, "equations.docx")
267 result = markitdown.convert(docx_file)
268
269 # Check for inline equation m=1 (wrapped with single $) is present
270 assert "$m=1$" in result.text_content, "Inline equation $m=1$ not found"
271
272 # Find block equations wrapped with double $$ and check if they are present
273 block_equations = re.findall(r"\$\$(.+?)\$\$", result.text_content)
274 assert block_equations, "No block equations found in the document."
275
276
277def test_input_as_strings() -> None:

Callers

nothing calls this directly

Calls 2

convertMethod · 0.95
MarkItDownClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…