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

Function validate_strings

packages/markitdown/tests/test_module_misc.py:100–107  ·  view source on GitHub ↗

Validate presence or absence of specific strings.

(result, expected_strings, exclude_strings=None)

Source from the content-addressed store, hash-verified

98
99# --- Helper Functions ---
100def validate_strings(result, expected_strings, exclude_strings=None):
101 """Validate presence or absence of specific strings."""
102 text_content = result.text_content.replace("\\", "")
103 for string in expected_strings:
104 assert string in text_content
105 if exclude_strings:
106 for string in exclude_strings:
107 assert string not in text_content
108
109
110def test_stream_info_operations() -> None:

Callers 2

test_docx_commentsFunction · 0.70
test_markitdown_llmFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…