@@ -34,19 +34,11 @@ def it_can_add_a_trPr(self, tr_cxml: str, expected_cxml: str):
3434 tr ._add_trPr ()
3535 assert tr .xml == xml (expected_cxml )
3636
37- @pytest .mark .parametrize (
38- ("snippet_idx" , "row_idx" , "col_idx" , "err_msg" ),
39- [
40- (0 , 0 , 3 , "index out of bounds" ),
41- (1 , 0 , 1 , "no cell on grid column 1" ),
42- ],
43- )
44- def it_raises_on_tc_at_grid_col (
45- self , snippet_idx : int , row_idx : int , col_idx : int , err_msg : str
46- ):
37+ @pytest .mark .parametrize (("snippet_idx" , "row_idx" , "col_idx" ), [(0 , 0 , 3 ), (1 , 0 , 1 )])
38+ def it_raises_on_tc_at_grid_col (self , snippet_idx : int , row_idx : int , col_idx : int ):
4739 tr = cast (CT_Tbl , parse_xml (snippet_seq ("tbl-cells" )[snippet_idx ])).tr_lst [row_idx ]
48- with pytest .raises (ValueError , match = err_msg ):
49- tr .tc_at_grid_col (col_idx )
40+ with pytest .raises (ValueError , match = f"no `tc` element at grid_offset= { col_idx } " ):
41+ tr .tc_at_grid_offset (col_idx )
5042
5143
5244class DescribeCT_Tc :
@@ -76,12 +68,12 @@ def it_can_merge_to_another_tc(
7668 top , left , height , width = 0 , 1 , 2 , 3
7769 _span_dimensions_ .return_value = top , left , height , width
7870 _tbl_ .return_value .tr_lst = [tr_ ]
79- tr_ .tc_at_grid_col .return_value = top_tc_
71+ tr_ .tc_at_grid_offset .return_value = top_tc_
8072
8173 merged_tc = tc .merge (other_tc )
8274
8375 _span_dimensions_ .assert_called_once_with (tc , other_tc )
84- top_tr_ .tc_at_grid_col .assert_called_once_with (left )
76+ top_tr_ .tc_at_grid_offset .assert_called_once_with (left )
8577 top_tc_ ._grow_to .assert_called_once_with (width , height )
8678 assert merged_tc is top_tc_
8779
0 commit comments