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
Index: src/z3c/rml/tests/input/tag-blockTableStyle-2.rml
===================================================================
--- src/z3c/rml/tests/input/tag-blockTableStyle-2.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-blockTableStyle-2.rml (working copy)
@@ -19,7 +19,7 @@
</stylesheet>
<story>
- <title><font face="Courier"><blockTableStyle></font> Tag Demo</title>
+ <title fontName="Courier"><blockTableStyle> Tag Demo</title>
<para>
This demo ensures that a table style can be applied multiple times.
Index: src/z3c/rml/tests/input/tag-keepInFrame.rml
===================================================================
--- src/z3c/rml/tests/input/tag-keepInFrame.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-keepInFrame.rml (working copy)
@@ -13,7 +13,7 @@
</template>
<story>
- <title><font face="Courier"><keepInFrame></font> Tag Demo</title>
+ <title fontName="Courier"><keepInFrame> Tag Demo</title>
<para>
This tag allows keeping a set of flowables in a confined space.
</para>
@@ -28,7 +28,7 @@
<keepInFrame maxWidth="3cm" maxHeight="2cm"
onOverflow="shrink" name="second">
- <title><font face="Courier"><keepInFrame></font> Tag Demo</title>
+ <title fontName="Courier"><keepInFrame> Tag Demo</title>
<para>
This tag allows keeping a set of flowables in a confined space.
</para>
Index: src/z3c/rml/tests/input/tag-blockTable-bulkData.rml
===================================================================
--- src/z3c/rml/tests/input/tag-blockTable-bulkData.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-blockTable-bulkData.rml (working copy)
@@ -11,7 +11,7 @@
<story>
- <title><font face="Courier"><bulkData></font> Tag Demo</title>
+ <title fontName="Courier"><bulkData> Tag Demo</title>
<blockTable >
<bulkData doc:example=""><![CDATA[
Product,Profit
Index: src/z3c/rml/tests/input/tag-pto.rml
===================================================================
--- src/z3c/rml/tests/input/tag-pto.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-pto.rml (working copy)
@@ -15,8 +15,7 @@
</stylesheet>
<story>
- <title>
- <font face="Courier"><pto></font> Tag Demo
+ <title fontName="Courier"><pto> Tag Demo
</title>
<para>
``pto`` allows us to specify text that is rendered before and after a
Index: src/z3c/rml/tests/input/tag-imageAndFlowables.rml
===================================================================
--- src/z3c/rml/tests/input/tag-imageAndFlowables.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-imageAndFlowables.rml (working copy)
@@ -12,8 +12,7 @@
</template>
<story>
- <title>
- <font face="Courier"><imageAndFlowables></font> Tag Demo
+ <title fontName="Courier"><imageAndFlowables> Tag Demo
</title>
<para>
This tag sets and image an flowables around it. This paragraph clearly
Index: src/z3c/rml/tests/input/tag-place.rml
===================================================================
--- src/z3c/rml/tests/input/tag-place.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-place.rml (working copy)
@@ -26,7 +26,7 @@
</path>
<place x="1cm" y="17cm" width="13cm" height="6cm">
- <title><font face="Courier"><place></font> Tag Demo</title>
+ <title fontname="Courier"><place> Tag Demo</title>
<para style="big">
This is the first paragraph.
</para>
Index: src/z3c/rml/tests/input/tag-spacer.rml
===================================================================
--- src/z3c/rml/tests/input/tag-spacer.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-spacer.rml (working copy)
@@ -12,7 +12,7 @@
</template>
<story>
- <title><font face="Courier"><spacer></font> Tag Demo</title>
+ <title fontName="Courier"><spacer> Tag Demo</title>
<para>
This is the first paragraph.
</para>
Index: src/z3c/rml/tests/input/tag-indent.rml
===================================================================
--- src/z3c/rml/tests/input/tag-indent.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-indent.rml (working copy)
@@ -12,7 +12,7 @@
</template>
<story>
- <title><font face="Courier"><indent></font> Tag Demo</title>
+ <title fontName="Courier"><indent> Tag Demo</title>
<para>
This tag allows you to indent a text as much as you like. This is
particularly interesting for block quotes and tree-like layouts.
Index: src/z3c/rml/tests/input/tag-blockTableStyle.rml
===================================================================
--- src/z3c/rml/tests/input/tag-blockTableStyle.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-blockTableStyle.rml (working copy)
@@ -61,7 +61,7 @@
</stylesheet>
<story>
- <title><font face="Courier"><blockTableStyle></font> Tag Demo</title>
+ <title fontName="Courier"><blockTableStyle> Tag Demo</title>
<blockTable style="table">
<tr>
Index: src/z3c/rml/tests/input/tag-fixedSize.rml
===================================================================
--- src/z3c/rml/tests/input/tag-fixedSize.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-fixedSize.rml (working copy)
@@ -16,7 +16,7 @@
</stylesheet>
<story>
- <title><font face="Courier"><fixedSize></font> Tag Demo</title>
+ <title fontName="Courier"><fixedSize> Tag Demo</title>
<para>
This tag allows keeping a set of flowables in a confined space. Actually
I have no clue what this tag is supposed to dol I did not find any
@@ -32,7 +32,7 @@
<nextFrame name="second" />
<fixedSize width="3cm" height="2cm" doc:example="">
- <title><font face="Courier"><fixedSize></font> Tag Demo</title>
+ <title fontName="Courier"><fixedSize> Tag Demo</title>
<para>
This tag allows keeping a set of flowables in a confined space.
</para>
Index: src/z3c/rml/tests/input/tag-alias.rml
===================================================================
--- src/z3c/rml/tests/input/tag-alias.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-alias.rml (working copy)
@@ -18,7 +18,7 @@
<story>
- <title><font face="Courier"><alias></font> Tag Demo</title>
+ <title fontName="Courier"><alias> Tag Demo</title>
<para style="h1">Header 1 via Alias</para>
</story>
Index: src/z3c/rml/tests/input/tag-illustration.rml
===================================================================
--- src/z3c/rml/tests/input/tag-illustration.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-illustration.rml (working copy)
@@ -12,7 +12,7 @@
</template>
<story>
- <title><font face="Courier"><illustration></font> Tag Demo</title>
+ <title fontName="Courier"><illustration> Tag Demo</title>
<para>
Illustrations allow graphical elements to be located into a story.
</para>
Index: src/z3c/rml/tests/input/tag-blockTable-1.rml
===================================================================
--- src/z3c/rml/tests/input/tag-blockTable-1.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-blockTable-1.rml (working copy)
@@ -11,7 +11,7 @@
<story>
- <title><font face="Courier"><blockTable></font> Tag Demo</title>
+ <title fontName="Courier"><blockTable> Tag Demo</title>
<blockTable
colWidths="50% 50%" rowHeights="1cm 1cm"
doc:example="">
Index: src/z3c/rml/tests/input/tag-blockTable-5.rml
===================================================================
--- src/z3c/rml/tests/input/tag-blockTable-5.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-blockTable-5.rml (working copy)
@@ -29,7 +29,7 @@
</stylesheet>
<story>
- <title><font face="Courier"><blockTable></font> Tag Demo</title>
+ <title fontName="Courier"><blockTable> Tag Demo</title>
<blockTable style="table">
<tr>
Index: src/z3c/rml/tests/input/tag-bookmark.rml
===================================================================
--- src/z3c/rml/tests/input/tag-bookmark.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-bookmark.rml (working copy)
@@ -11,10 +11,9 @@
<story>
- <title>
- <font face="Courier"><bookmark></font>
+ <title fontName="Courier"><bookmark>
and
- <font face="Courier"><link></font>
+ <link>
Tag Demo
</title>
<bookmark name="TITLE" doc:example="" />
Index: src/z3c/rml/tests/input/tag-plugInFlowable.rml
===================================================================
--- src/z3c/rml/tests/input/tag-plugInFlowable.rml (revision 80889)
+++ src/z3c/rml/tests/input/tag-plugInFlowable.rml (working copy)
@@ -13,7 +13,7 @@
<story>
- <title><font face="Courier"><pluginFlowable></font> Tag Demo</title>
+ <title fontName="Courier"><pluginFlowable> Tag Demo</title>
<para>
You can also integrate arbitrary flowables.
</para>
Index: src/z3c/rml/tests/test_rml.py
===================================================================
--- src/z3c/rml/tests/test_rml.py (revision 80889)
+++ src/z3c/rml/tests/test_rml.py (working copy)
@@ -78,13 +78,18 @@
def runTest(self):
# Convert the base PDF to image(s)
+ py = sys.executable
status = subprocess.Popen(
- GS_COMMAND %(self._basePath[:-4], self._basePath)).wait()
+ GS_COMMAND %(self._basePath[:-4], self._basePath),executable=py,
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
if status:
return
# Convert the test PDF to image(s)
status = subprocess.Popen(
- GS_COMMAND %(self._testPath[:-4], self._testPath)).wait()
+ GS_COMMAND %(self._testPath[:-4], self._testPath),executable=py,
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
if status:
return
# Go through all pages and ensure their equality
_______________________________________________
Zope-Dev maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )