@@ -38,6 +38,16 @@ def given_a_section_having_start_type(context, start_type):
3838
3939# when =====================================================
4040
41+ @when ('I set the section page height to {y} inches' )
42+ def when_I_set_the_section_page_height_to_y_inches (context , y ):
43+ context .section .page_height = Inches (float (y ))
44+
45+
46+ @when ('I set the section page width to {x} inches' )
47+ def when_I_set_the_section_page_width_to_x_inches (context , x ):
48+ context .section .page_width = Inches (float (x ))
49+
50+
4151@when ('I set the section start type to {start_type}' )
4252def when_I_set_the_section_start_type_to_start_type (context , start_type ):
4353 new_start_type = {
@@ -53,14 +63,14 @@ def when_I_set_the_section_start_type_to_start_type(context, start_type):
5363
5464# then =====================================================
5565
56- @then ('the reported page width is 8.5 inches' )
57- def then_the_reported_page_width_is_width (context ):
58- assert context .section .page_width == Inches (8.5 )
66+ @then ('the reported page width is {x} inches' )
67+ def then_the_reported_page_width_is_width (context , x ):
68+ assert context .section .page_width == Inches (float ( x ) )
5969
6070
61- @then ('the reported page height is 11 inches' )
62- def then_the_reported_page_height_is_11_inches (context ):
63- assert context .section .page_height == Inches (11 )
71+ @then ('the reported page height is {y} inches' )
72+ def then_the_reported_page_height_is_11_inches (context , y ):
73+ assert context .section .page_height == Inches (float ( y ) )
6474
6575
6676@then ('the reported section start type is {start_type}' )
0 commit comments