Test image for unit tests without PIL?

Clemens Klein-Robbenhaar <crobbenhaar-S0/[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Hi,

  something completely different: I just figured out that one of the unit
tests on a plain Silva instance fails, if no ExtFile Product is installed.

  The reason seems to be that the file for testing is a TIFF, and the ZODB Image
created by the test does not understand that data format. (An ExtFile Image
seemingly would.)

  Actually thats happening in the test_fileservices.FileServicesTest.test_fileservices.py
Traceback is attached.
  Would anyone mind if I replace that test image with a *.jpg or something else
that ZODB Image likes more? Or is ExtFile that much recommended that taking any efforts to
get away without it is just considered pointless?

Cheers,
Clemens

_______________________________________________
silva-dev mailing list
silva-dev-IAPFreCvJWM6s/[email protected]
http://lists.infrae.com/mailman/listinfo/silva-dev
unit.err (text/plain, 1.3 KB)
======================================================================
ERROR: test_manage_convertStorage (test_fileservices.FileServicesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_fileservices.py", line 174, in test_manage_convertStorage
    self._test_image('testimage', self.root)
  File "test_fileservices.py", line 60, in _test_image
    context.manage_addProduct['Silva'].manage_addImage(
  File "/homes/clemens/work/infrae/silva/head/inst/plain/Products/Silva/Image.py", line 701, in manage_addImage
    img.set_image(file)
  File "/homes/clemens/work/infrae/silva/head/inst/plain/Products/Silva/Image.py", line 190, in set_image
    self._image_factory('hires_image', file, ct)
  File "/homes/clemens/work/infrae/silva/head/inst/plain/Products/Silva/Image.py", line 584, in _image_factory
    self.getDimensions(image)
  File "/homes/clemens/work/infrae/silva/head/inst/plain/Products/Silva/Image.py", line 311, in getDimensions
    width, height = self._get_dimensions_from_image_data(img)
  File "/homes/clemens/work/infrae/silva/head/inst/plain/Products/Silva/Image.py", line 654, in _get_dimensions_from_image_data
    raise ValueError, "Could not identify image type."
ValueError: Could not identify image type.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.