@@ -108,6 +108,10 @@ def it_knows_its_type(self, type_get_fixture):
108108 style , expected_value = type_get_fixture
109109 assert style .type == expected_value
110110
111+ def it_knows_its_name (self , name_get_fixture ):
112+ style , expected_value = name_get_fixture
113+ assert style .name == expected_value
114+
111115 # fixture --------------------------------------------------------
112116
113117 @pytest .fixture (params = [
@@ -131,6 +135,15 @@ def id_set_fixture(self, request):
131135 expected_xml = xml (expected_style_cxml )
132136 return style , new_value , expected_xml
133137
138+ @pytest .fixture (params = [
139+ ('w:style{w:type=table}' , None ),
140+ ('w:style{w:type=table}/w:name{w:val=Boofar}' , 'Boofar' ),
141+ ])
142+ def name_get_fixture (self , request ):
143+ style_cxml , expected_value = request .param
144+ style = BaseStyle (element (style_cxml ))
145+ return style , expected_value
146+
134147 @pytest .fixture (params = [
135148 ('w:style' , WD_STYLE_TYPE .PARAGRAPH ),
136149 ('w:style{w:type=paragraph}' , WD_STYLE_TYPE .PARAGRAPH ),
0 commit comments