88
99import pytest
1010
11- from docx .image import Image
11+ from docx .image import Image_OLD
1212from docx .opc .constants import CONTENT_TYPE as CT
1313
1414from ..unitutil import test_file
1515
1616
17- class DescribeImage (object ):
17+ class DescribeImage_OLD (object ):
1818
1919 def it_can_construct_from_an_image_path (self ):
2020 image_file_path = test_file ('monty-truth.png' )
21- image = Image .from_file (image_file_path )
22- assert isinstance (image , Image )
21+ image = Image_OLD .from_file (image_file_path )
22+ assert isinstance (image , Image_OLD )
2323 assert image .sha1 == '79769f1e202add2e963158b532e36c2c0f76a70c'
2424 assert image .filename == 'monty-truth.png'
2525
2626 def it_can_construct_from_an_image_stream (self ):
2727 image_file_path = test_file ('monty-truth.png' )
2828 with open (image_file_path , 'rb' ) as image_file_stream :
29- image = Image .from_file (image_file_stream )
30- assert isinstance (image , Image )
29+ image = Image_OLD .from_file (image_file_stream )
30+ assert isinstance (image , Image_OLD )
3131 assert image .sha1 == '79769f1e202add2e963158b532e36c2c0f76a70c'
3232 assert image .filename == 'image.png'
3333
3434 def it_knows_the_extension_of_a_file_based_image (self ):
3535 image_file_path = test_file ('monty-truth.png' )
36- image = Image .from_file (image_file_path )
36+ image = Image_OLD .from_file (image_file_path )
3737 assert image .ext == '.png'
3838
3939 def it_knows_the_extension_of_a_stream_based_image (self ):
4040 image_file_path = test_file ('monty-truth.png' )
4141 with open (image_file_path , 'rb' ) as image_file_stream :
42- image = Image .from_file (image_file_stream )
42+ image = Image_OLD .from_file (image_file_stream )
4343 assert image .ext == '.png'
4444
4545 def it_correctly_characterizes_a_few_known_images (
@@ -49,7 +49,7 @@ def it_correctly_characterizes_a_few_known_images(
4949 characteristics
5050 )
5151 with open (test_file (image_path ), 'rb' ) as stream :
52- image = Image .from_file (stream )
52+ image = Image_OLD .from_file (stream )
5353 assert image .ext == ext
5454 assert image .content_type == content_type
5555 assert image .px_width == px_width
0 commit comments