Example #1
0
 def it_raises_on_unrecognized_image_stream(self):
     stream = BytesIO(b'foobar 666 not an image stream')
     with pytest.raises(UnrecognizedImageError):
         _ImageHeaderFactory(stream)
Example #2
0
 def it_raises_on_unrecognized_image_stream(self):
     stream = BytesIO(b'foobar 666 not an image stream')
     with pytest.raises(UnrecognizedImageError):
         _ImageHeaderFactory(stream)
Example #3
0
 def it_constructs_the_right_class_for_a_given_image_stream(
         self, call_fixture):
     stream, expected_class = call_fixture
     image_header = _ImageHeaderFactory(stream)
     assert isinstance(image_header, expected_class)
Example #4
0
 def it_constructs_the_right_class_for_a_given_image_stream(
         self, call_fixture):
     stream, expected_class = call_fixture
     image_header = _ImageHeaderFactory(stream)
     assert isinstance(image_header, expected_class)