#NEWLINE# @ pytest . fixture ( params = [ ( ( 444 , 333 ) , ( 'l' , 'r' ) ) , ( ( 333 , 444 ) , ( 't' , 'b' ) ) ] ) #NEWLINE# def pic_fixture( self , request , _get_or_add_image_ ) : #NEWLINE# #INDENT# ( image_size , crop_attr_names ) = request . param #NEWLINE# sp_cxml = 'p:sp/(p:nvSpPr/p:cNvPr{id=2,name=foo},p:spPr/a:xfrm/a:ext{cx=99,cy=99})' #NEWLINE# sp = element ( sp_cxml ) #NEWLINE# picture_ph = PicturePlaceholder ( expected_xml , None ) #NEWLINE# image_file = 'foobar.png' #NEWLINE# _get_or_add_image_ . return_value = ( 42 , 'bar' , image_size ) #NEWLINE# expected_xml = xml ( ( 'p:pic/(p:nvPicPr/(p:cNvPr{id=2,name=foo,descr=bar},p:cNvPicPr/a:picLocks{noGrp=1,noChangeAspect=1},p:nvPr),p:blipFill/(a:blip{r:embed=42},a:srcRect{%s=12500,%s=12500},a:stretch/a:fillRect),p:spPr)' % crop_attr_names ) ) #NEWLINE# return ( picture_ph , image_file , expected_xml )