@@ -39,6 +39,11 @@ def it_provides_access_to_a_cell_by_row_and_col_indices(self, table):
3939 tc = tr .tc_lst [col_idx ]
4040 assert tc is cell ._tc
4141
42+ def it_provides_access_to_the_cells_in_a_row (self , row_cells_fixture ):
43+ table , row_idx , expected_cells = row_cells_fixture
44+ row_cells = table .row_cells (row_idx )
45+ assert row_cells == expected_cells
46+
4247 def it_can_add_a_row (self , add_row_fixture ):
4348 table , expected_xml = add_row_fixture
4449 row = table .add_row ()
@@ -120,6 +125,15 @@ def autofit_set_fixture(self, request):
120125 expected_xml = xml (expected_tbl_cxml )
121126 return table , new_value , expected_xml
122127
128+ @pytest .fixture
129+ def row_cells_fixture (self , _cells_ , _column_count_ ):
130+ table = Table (None , None )
131+ _cells_ .return_value = [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ]
132+ _column_count_ .return_value = 3
133+ row_idx = 1
134+ expected_cells = [3 , 4 , 5 ]
135+ return table , row_idx , expected_cells
136+
123137 @pytest .fixture
124138 def table_fixture (self ):
125139 table = Table (None , None )
@@ -152,6 +166,14 @@ def table_style_set_fixture(self, request):
152166
153167 # fixture components ---------------------------------------------
154168
169+ @pytest .fixture
170+ def _cells_ (self , request ):
171+ return property_mock (request , Table , '_cells' )
172+
173+ @pytest .fixture
174+ def _column_count_ (self , request ):
175+ return property_mock (request , Table , '_column_count' )
176+
155177 @pytest .fixture
156178 def table (self ):
157179 tbl = _tbl_bldr (rows = 2 , cols = 2 ).element
0 commit comments