On Feb 8, 2005, at 16:14, Fredrik Lundh wrote:

Bob Ippolito wrote:

% python selftest.py
*****************************************************************
Failure in example: d.line((0, 0, 128, 128), fill=128)
from line #84 of selftest.testimage
Exception raised:
Traceback (most recent call last):
  File "./doctest.py", line 499, in _run_examples_inner
    exec compile(source, "<string>", "single") in globs
  File "<string>", line 1, in ?
  File "PIL/ImageDraw.py", line 199, in line
    self.draw.draw_lines(xy, ink, width)
TypeError: function takes exactly 2 arguments (3 given)

looks like PIL's picking up an old _imaging module.

try importing _imaging from the Python prompt, and check what the __file__
attribute points to.

That fixes it, of course.

% python selftest.py
55 tests passed.

Most of the projects I deal with will run tests with the build dir in sys.path so that you don't have to install before testing.. It might be better to create a "test" distutils command that runs the test and ensures that a build already happened, we do this for PyObjC.

-bob

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to