MCPcopy Index your code
hub / github.com/python-openxml/python-docx / it_can_add_text

Method it_can_add_text

tests/text/test_run.py:261–269  ·  view source on GitHub ↗
(
        self, r_cxml: str, new_text: str, expected_cxml: str, Text_: Mock, paragraph_: Mock
    )

Source from the content-addressed store, hash-verified

259 ],
260 )
261 def it_can_add_text(
262 self, r_cxml: str, new_text: str, expected_cxml: str, Text_: Mock, paragraph_: Mock
263 ):
264 run = Run(cast(CT_R, element(r_cxml)), paragraph_)
265
266 text = run.add_text(new_text)
267
268 assert run._r.xml == xml(expected_cxml)
269 assert text is Text_.return_value
270
271 @pytest.mark.parametrize(
272 ("break_type", "expected_cxml"),

Callers

nothing calls this directly

Calls 4

add_textMethod · 0.95
RunClass · 0.90
elementFunction · 0.85
xmlFunction · 0.85

Tested by

no test coverage detected