| 136 | ) |
| 137 | |
| 138 | def it_knows_its_character_style( |
| 139 | self, part_prop_: Mock, document_part_: Mock, paragraph_: Mock |
| 140 | ): |
| 141 | style_ = document_part_.get_style.return_value |
| 142 | part_prop_.return_value = document_part_ |
| 143 | style_id = "Barfoo" |
| 144 | run = Run(cast(CT_R, element(f"w:r/w:rPr/w:rStyle{{w:val={style_id}}}")), paragraph_) |
| 145 | |
| 146 | style = run.style |
| 147 | |
| 148 | document_part_.get_style.assert_called_once_with(style_id, WD_STYLE_TYPE.CHARACTER) |
| 149 | assert style is style_ |
| 150 | |
| 151 | @pytest.mark.parametrize( |
| 152 | ("r_cxml", "value", "style_id", "expected_cxml"), |