[reportlab-users] Newbie Reportlab Tests questions

Robin Becker robin at reportlab.com
Fri Sep 29 03:33:14 EDT 2006


Lee Hulbert II wrote:
> OK, I just installed reportlab on two computers.  Both are WinXP, and 
> I'm running python 2.4.  I had some errors in the tests, but most tests 
> passed.  I have some questions and observations about them, though.
> 
.......
> On my first machine, I went to the python 2.4 library, and typed "python 
> ./reportlab/test/runall.py".  It ran, and reported three errors.  All 
> three boiled down to "IOError: Cannot open resource 
> "../docs/images/Edit_Prefs.gif""  Running from the python directory 
> makes tests 10, 7, and 8 fail.  I verified this on my second machine.  
> Since other tests had not problem with the directory either way, I was 
> wondering if this is considered a bug.
> 

Probably we should fix the runAll.py script to ensure it starts in the 
right place; so it's a bug.


> I figured out that issue, and ran it again, from the test directory.  In 
> this case, two tests failed, both having to do with pulling an image off 
> the website.  Neither of these failed the first time, so I don't know 
> why they did the second.  I'm not worried about those though.  My second 
> machine threw two "xml parser" errors that I haven't researched yet 
> either, in tests 0 and 1.

Have you installed the reportlab C extensions? Additionally one of the 
tests is indeed trying to fetch a remote image and can fail for that 
reason alone.

........
> 1:   In test_charts_textlabels.pdf, the text indicates that the 
> direction indicators(nsew) should be in their correct positions.  In my 
> pdfs, they are consistently backward.  n is the bottom, s is top, w is 
> right, e is left. 

This is a relativity issue. When setting the anchor the attachment is at 
the compass point of the standardized box in a normal position ie text 
pointing upwards. The xy position specified for the BOX is fixed (at the 
cross hairs in the example). A box labelled se is attached to the 
crosshair at its se corner so it must be above the horizontal crosshair 
and to the left of the vertical.

> 2:   In test_graphics_charts.pdf, several charts have issues.  All of 
> the "col" charts have what looks like setup code overlaid on them.

The charts are correctly drawn although badly laid out(or designed)
> 
> 3:    In test_paragraps.pdf, the text "Courier 3cm" overlays several 
> lines of previous text.  Is this correct, or should it be justified down 
> into its own space?
......
We don't adjust the leading according to content; that is alleged to be 
a 'bad thing'. Putting 3cm characters inside a 10pt line is 'discouraged'.
-- 
Robin Becker


More information about the reportlab-users mailing list