File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,9 @@ def given_a_table_having_two_rows(context):
130130
131131# when =====================================================
132132
133- @when ('I add a column to the table' )
134- def when_add_column_to_table (context ):
135- table = context .table_
136- context .column = table .add_column ()
133+ @when ('I add a 1.0 inch column to the table' )
134+ def when_I_add_a_1_inch_column_to_table (context ):
135+ context .column = context .table_ .add_column (Inches (1.0 ))
137136
138137
139138@when ('I add a row to the table' )
@@ -299,6 +298,11 @@ def then_new_column_has_2_cells(context):
299298 assert len (context .column .cells ) == 2
300299
301300
301+ @then ('the new column is 1.0 inches wide' )
302+ def then_new_column_is_1_inches_wide (context ):
303+ assert context .column .width == Inches (1 )
304+
305+
302306@then ('the new row has 2 cells' )
303307def then_new_row_has_2_cells (context ):
304308 assert len (context .row .cells ) == 2
Original file line number Diff line number Diff line change @@ -3,14 +3,20 @@ Feature: Add a row or column to a table
33 As a developer using python-docx
44 I need methods to add a row or column
55
6+
7+ @wip
68 Scenario : Add a row to a table
79 Given a 2 x 2 table
810 When I add a row to the table
911 Then the table has 3 rows
1012 And the new row has 2 cells
13+ And the width of each cell is 3.0 inches
14+
1115
16+ @wip
1217 Scenario : Add a column to a table
1318 Given a 2 x 2 table
14- When I add a column to the table
19+ When I add a 1.0 inch column to the table
1520 Then the table has 3 columns
1621 And the new column has 2 cells
22+ And the new column is 1.0 inches wide
You can’t perform that action at this time.
0 commit comments