<s> """<STR_LIT>""" <EOL> import os . path <EOL> from sanpera . image import Image <EOL> def data_root ( ) : <EOL> return os . path . join ( <EOL> os . path . split ( __file__ ) [ <NUM_LIT:0> ] , <EOL> '<STR_LIT:data>' ) <EOL> def find_image ( path ) : <EOL> """<STR_LIT>""" <EOL> return os . path . join ( data_root ( ) , path ) <EOL> def get_image ( path ) : <EOL> """<STR_LIT>""" <EOL> return Image . read ( find_image ( path ) ) <EOL> def assert_identical ( img1 , img2 ) : <EOL> """<STR_LIT>""" <EOL> assert img1 . size == img2 . size <EOL> img1 . bit_depth = <NUM_LIT:8> <EOL> img2 . bit_depth = <NUM_LIT:8> <EOL> buf1 = img1 . to_buffer ( format = '<STR_LIT>' ) <EOL> buf2 = img2 . to_buffer ( format = '<STR_LIT>' ) <EOL> assert buf1 [ : ] == buf2 [ : ] </s>
