Hi Stephan, I am getting some test failure in z3c.rml trunk. One issue is due to the use of non-existing 'font' tag. I can't find this tag in 'rml.dtd' and reference. (But I can see a single use of 'font' tag in reference, but it is in a different context, I think should should be replaced as described below) All the places where 'font' tag used is as a child of 'title' tag. And 'face' is the only attribute used for the font tag in tests. Now 'title' has a 'fontName' attribute, from the DTD and reference I deduced that tests should use this instead of 'font' tag, is it correct ? There is another issue when I run tests in level 2, this can be solved by using few more arguments to Popen . (see the patch attached) There is one more remaining issue while parsing 'tag-textField.xml' I have given the trace back below, but if I parse this file individually, there is no test failure ! May be this is due to tests are not cleaned up properly. Regards, Baiju M Error in test runTest (z3c.rml.tests.test_rml.tag-textField) Traceback (most recent call last): File "/baiju/usr//lib/python2.4/unittest.py", line 260, in run testMethod() File "/home/baiju/office/z298i/z3c.rml/src/z3c/rml/tests/test_rml.py", line 60, in runTest rml2pdf.go(self._inPath, self._outPath) File "/home/baiju/office/z298i/z3c.rml/src/z3c/rml/rml2pdf.py", line 64, in go doc.process(outputFile) File "/home/baiju/office/z298i/z3c.rml/src/z3c/rml/document.py", line 281, in process self.canvas.save() File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfgen/canvas.py", line 877, in save self._doc.SaveToFile(self._filename, self) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 219, in SaveToFile f.write(self.GetPDFData(canvas)) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 241, in GetPDFData return self.format() File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 384, in format IOf = IO.format(self) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 778, in format fcontent = format(content, document, toplevel=1) # yes this is at top level File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 95, in format f = element.format(document) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfform.py", line 175, in format return proxy.format(document) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfpattern.py", line 54, in format L.append(format(value, document)) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 93, in format return document.Reference(element).format(document) File "/home/baiju/office/z298i/z3c.rml/src/reportlab/pdfbase/pdfdoc.py", line 475, in Reference raise ValueError, "object named but not registered" ValueError: object named but not registered
Baiju M wrote:
Hi Stephan, I am getting some test failure in z3c.rml trunk. One issue is due to the use of non-existing 'font' tag. I can't find this tag in 'rml.dtd' and reference. (But I can see a single use of 'font' tag in reference, but it is in a different context, I think should should be replaced as described below)
All the places where 'font' tag used is as a child of 'title' tag. And 'face' is the only attribute used for the font tag in tests.
Now 'title' has a 'fontName' attribute, from the DTD and reference I deduced that tests should use this instead of 'font' tag, is it correct ?
There is another issue when I run tests in level 2, this can be solved by using few more arguments to Popen . (see the patch attached)
There is one more remaining issue while parsing 'tag-textField.xml' I have given the trace back below, but if I parse this file individually, there is no test failure ! May be this is due to tests are not cleaned up properly.
Um, it looks like if 'font' tag come as child of 'story' tag there is no test failure. But which is the best for the tests failing ? use 'fontName' attribute in 'title' or use 'story' tag ? -- Baiju M
On Tuesday 16 October 2007, Baiju M wrote:
All the places where 'font' tag used is as a child of 'title' tag. And 'face' is the only attribute used for the font tag in tests.
The <font> tag, like the <b>, <i>, and <u> tag are features of Reportlab's paragraph implementation. The <title> tag is just a special case of a paragraph. So it should probably be considered a documentation bug that those paragraph-internal tags are not in the reference. Further, I think the <font> tag was new in ReportLab 2.0 or 2.1.
Now 'title' has a 'fontName' attribute, from the DTD and reference I deduced that tests should use this instead of 'font' tag, is it correct ?
No, because the 'fontName' can only set the font for the entire title and not just a sub-string in the title.
There is another issue when I run tests in level 2, this can be solved by using few more arguments to Popen . (see the patch attached)
Okay, what OS are you using? Is it still occurring?
There is one more remaining issue while parsing 'tag-textField.xml' I have given the trace back below, but if I parse this file individually, there is no test failure ! May be this is due to tests are not cleaned up properly.
No this is because ReportLab is not thread-safe. Heck, it is not even safe to run multiple renderings in the same Python session. The level 2 tests show off a solution that solves this problem by starting a new sub-process for each rendering. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training
participants (2)
-
Baiju M -
Stephan Richter