@@ -441,6 +441,10 @@ def it_provides_access_to_the_row_cells(self):
441441 cells = row .cells
442442 assert isinstance (cells , _RowCells )
443443
444+ def it_provides_access_to_the_table_it_belongs_to (self , table_fixture ):
445+ row , table_ = table_fixture
446+ assert row .table is table_
447+
444448 # fixtures -------------------------------------------------------
445449
446450 @pytest .fixture
@@ -451,12 +455,22 @@ def cells_fixture(self, _index_, table_prop_, table_):
451455 table_ .row_cells .return_value = list (expected_cells )
452456 return row , row_idx , expected_cells
453457
458+ @pytest .fixture
459+ def table_fixture (self , parent_ , table_ ):
460+ row = _Row (None , parent_ )
461+ parent_ .table = table_
462+ return row , table_
463+
454464 # fixture components ---------------------------------------------
455465
456466 @pytest .fixture
457467 def _index_ (self , request ):
458468 return property_mock (request , _Row , '_index' )
459469
470+ @pytest .fixture
471+ def parent_ (self , request ):
472+ return instance_mock (request , Table )
473+
460474 @pytest .fixture
461475 def table_ (self , request ):
462476 return instance_mock (request , Table )
0 commit comments