Esempio n. 1
0
 def it_knows_image_width_and_height_after_parsing(self):
     px_width, px_height = 42, 24
     entries = {TIFF_TAG.IMAGE_WIDTH: px_width, TIFF_TAG.IMAGE_LENGTH: px_height}
     ifd_entries = _IfdEntries(entries)
     tiff_parser = _TiffParser(ifd_entries)
     assert tiff_parser.px_width == px_width
     assert tiff_parser.px_height == px_height
Esempio n. 2
0
 def it_knows_image_width_and_height_after_parsing(self):
     px_width, px_height = 42, 24
     entries = {
         TIFF_TAG.IMAGE_WIDTH:  px_width,
         TIFF_TAG.IMAGE_LENGTH: px_height,
     }
     ifd_entries = _IfdEntries(entries)
     tiff_parser = _TiffParser(ifd_entries)
     assert tiff_parser.px_width == px_width
     assert tiff_parser.px_height == px_height
Esempio n. 3
0
 def it_has_basic_mapping_semantics(self):
     key, value = 1, "foobar"
     entries = {key: value}
     ifd_entries = _IfdEntries(entries)
     assert key in ifd_entries
     assert ifd_entries[key] == value
Esempio n. 4
0
 def it_has_basic_mapping_semantics(self):
     key, value = 1, 'foobar'
     entries = {key: value}
     ifd_entries = _IfdEntries(entries)
     assert key in ifd_entries
     assert ifd_entries[key] == value