#17 Assertion failure in test_platypus_paragraphs.py

closed-fixed
None
5
2009-02-18
2009-02-17
No

C:\wordaxe\trunk\tests>c:\python25\python test_platypus_paragraphs.py
.........Assertion failure
self.width=137.028000
nFrags=11
printrange=0:11
printwidth=140.028000
0 SW() 41.04
1 SP( ) 3.0
2 SW(some) 25.332
3 SP( ) 3.0
4 SW(text) 18.0
5 SP( ) 3.0
6 SW(after) 21.984
7 SP( ) 3.0
8 SW(img) 18.672
9 SP( ) 3.0
10 NL 0
Assertion failure
self.width=41.040000
nFrags=3
printrange=0:3
printwidth=44.040000
0 SW() 41.04
1 SP( ) 3.0
2 NL 0
.
----------------------------------------------------------------------
Ran 10 tests in 12.343s

OK

This happens to be VERY similar to the error Harald Armin Massa posted on the reportlab-users mailing list today.

Discussion

  • H. von Bargen

    H. von Bargen - 2009-02-18
    • status: open --> closed-fixed
     
  • H. von Bargen

    H. von Bargen - 2009-02-18

    If a paragraph contained explicit line breaks ("<br/>"), this would fool the algorithm for the computation of the range of fragments which contribute to the actual line width, because the StyledSpace to the left of the StyledNewLine would then add to the width.
    This is now fixed in the SVN trunk, the test suite now runs without errors.

     

Log in to post a comment.