tests/test_platypus_general.py
branchpy33
changeset 3849 8ff9b1fb92cd
parent 3794 398ea04239b5
child 4090 054784834fed
--- a/tests/test_platypus_general.py	Wed Nov 27 15:17:54 2013 +0000
+++ b/tests/test_platypus_general.py	Wed Nov 27 15:18:57 2013 +0000
@@ -22,7 +22,7 @@
 from reportlab.lib.styles import PropertySet, getSampleStyleSheet, ParagraphStyle
 from reportlab.lib import colors
 from reportlab.rl_config import defaultPageSize
-from reportlab.lib.utils import haveImages, _RL_DIR, rl_isfile, open_for_read, fileName2Utf8
+from reportlab.lib.utils import haveImages, _RL_DIR, rl_isfile, open_for_read, fileName2FSEnc
 import unittest
 from reportlab.lib.testutils import testsFolder
 if haveImages:
@@ -30,7 +30,7 @@
     if not rl_isfile(_GIF): _GIF = None
 else:
     _GIF = None
-if _GIF: _GIFUTF8=fileName2Utf8(_GIF)
+if _GIF: _GIFFSEnc=fileName2FSEnc(_GIF)
 
 _JPG = os.path.join(testsFolder,'..','docs','images','lj8100.jpg')
 if not rl_isfile(_JPG): _JPG = None
@@ -312,11 +312,11 @@
     story.append(FrameBreak())
     if _GIF:
         story.append(Paragraph("""We can use images via the file name""", styleSheet['BodyText']))
-        code('''    story.append(platypus.Image('%s'))'''%_GIFUTF8)
-        code('''    story.append(platypus.Image(fileName2Utf8('%s')))''' % _GIFUTF8)
+        code('''    story.append(platypus.Image('%s'))'''%_GIFFSEnc)
+        code('''    story.append(platypus.Image(fileName2FSEnc('%s')))''' % _GIFFSEnc)
         story.append(Paragraph("""They can also be used with a file URI or from an open python file!""", styleSheet['BodyText']))
-        code('''    story.append(platypus.Image('%s'))'''% getFurl(_GIFUTF8))
-        code('''    story.append(platypus.Image(open_for_read('%s','b')))''' % _GIFUTF8)
+        code('''    story.append(platypus.Image('%s'))'''% getFurl(_GIFFSEnc))
+        code('''    story.append(platypus.Image(open_for_read('%s','b')))''' % _GIFFSEnc)
         story.append(FrameBreak())
         story.append(Paragraph("""Images can even be obtained from the internet.""", styleSheet['BodyText']))
         code('''    img = platypus.Image('http://www.reportlab.com/rsrc/encryption.gif')
@@ -358,7 +358,7 @@
 
     story.append(Paragraph("""Same but with justification 1.5 extra leading and green text.""", styleSheet['BodyText']))
     p = Paragraph("""
-        <para align=justify leading=+1.5 fg=green><font color=red>Platypus</font> is all about fitting objects into frames on the page.  You
+        <para align=justify leading="+1.5" fg=green><font color=red>Platypus</font> is all about fitting objects into frames on the page.  You
         are looking at a fairly simple Platypus paragraph in Debug mode.
         It has some gridlines drawn around it to show the left and right indents,
         and the space before and after, all of which are attributes set in
@@ -496,7 +496,7 @@
         story.append(Paragraph("Here is an Image flowable obtained from a string filename.",styleSheet['Italic']))
         story.append(platypus.Image(_GIF))
         story.append(Paragraph( "Here is an Image flowable obtained from a utf8 filename.", styleSheet['Italic']))
-        #story.append(platypus.Image(fileName2Utf8(_GIF)))
+        #story.append(platypus.Image(fileName2FSEnc(_GIF)))
         story.append(Paragraph("Here is an Image flowable obtained from a string file url.",styleSheet['Italic']))
         story.append(platypus.Image(getFurl(_GIF)))
         story.append(Paragraph("Here is an Image flowable obtained from an open file.",styleSheet['Italic']))