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

Method it_knows_its_table_style

tests/test_table.py:217–225  ·  view source on GitHub ↗
(self, part_prop_: Mock, document_part_: Mock, document_: Mock)

Source from the content-addressed store, hash-verified

215 assert table._element.xml == xml(expected_cxml)
216
217 def it_knows_its_table_style(self, part_prop_: Mock, document_part_: Mock, document_: Mock):
218 part_prop_.return_value = document_part_
219 style_ = document_part_.get_style.return_value
220 table = Table(cast(CT_Tbl, element("w:tbl/w:tblPr/w:tblStyle{w:val=BarBaz}")), document_)
221
222 style = table.style
223
224 document_part_.get_style.assert_called_once_with("BarBaz", WD_STYLE_TYPE.TABLE)
225 assert style is style_
226
227 @pytest.mark.parametrize(
228 ("tbl_cxml", "new_value", "style_id", "expected_cxml"),

Callers

nothing calls this directly

Calls 2

TableClass · 0.90
elementFunction · 0.85

Tested by

no test coverage detected