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

Method it_can_add_a_break

tests/text/test_run.py:282–287  ·  view source on GitHub ↗
(self, break_type: WD_BREAK, expected_cxml: str, paragraph_: Mock)

Source from the content-addressed store, hash-verified

280 ],
281 )
282 def it_can_add_a_break(self, break_type: WD_BREAK, expected_cxml: str, paragraph_: Mock):
283 run = Run(cast(CT_R, element("w:r")), paragraph_)
284
285 run.add_break(break_type)
286
287 assert run._r.xml == xml(expected_cxml)
288
289 @pytest.mark.parametrize(
290 ("r_cxml", "expected_cxml"), [('w:r/w:t"foo"', 'w:r/(w:t"foo", w:tab)')]

Callers

nothing calls this directly

Calls 4

add_breakMethod · 0.95
RunClass · 0.90
elementFunction · 0.85
xmlFunction · 0.85

Tested by

no test coverage detected