def when_add_inline_picture_to_document(context): document = context.document context.inline_shape = (document.inline_shapes.add_picture( test_file_path('monty-truth.png')))
def given_image_filename(context, filename): context.image_path = test_file_path(filename)
def when_add_picture_specifying_only_image_file(context): document = context.document context.picture = document.add_picture(test_file_path('monty-truth.png'))
def when_add_inline_picture_from_file_like_object(context): document = context.document with open(test_file_path('monty-truth.png'), 'rb') as f: context.inline_shape = document.inline_shapes.add_picture(f)
def when_add_picture_specifying_width(context): document = context.document context.picture = document.add_picture( test_file_path('monty-truth.png'), width=Inches(1.5) )
def when_add_inline_picture_to_document(context): document = context.document context.inline_shape = (document.inline_shapes.add_picture( test_file_path('monty-truth.png') ))
def when_add_picture_specifying_width(context): document = context.document context.picture = document.add_picture(test_file_path('monty-truth.png'), width=Inches(1.5))