reportlab/test/test_platypus_breaking.py
author rgbecker
Fri, 21 Jul 2006 12:44:40 +0000
changeset 2664 c9faa3a99e93
parent 2660 c147aff8edae
child 2671 d076db57c478
permissions -rw-r--r--
reportlab/platypus: <br/> tags now working
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2332
2a7ab4405e18 Remove $Header:, fix CopyRight & history
rgbecker
parents: 2268
diff changeset
     1
#Copyright ReportLab Europe Ltd. 2000-2004
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     2
#see license.txt for license details
2332
2a7ab4405e18 Remove $Header:, fix CopyRight & history
rgbecker
parents: 2268
diff changeset
     3
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/test/test_platypus_breaking.py
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     4
"""Tests pageBreakBefore, frameBreakBefore, keepWithNext...
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     5
"""
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     6
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     7
import sys, os, time
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     8
from string import split, strip, join, whitespace
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
     9
from operator import truth
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    10
from types import StringType, ListType
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    11
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    12
from reportlab.test import unittest
2505
0859d48c2558 reportlab/test: fix so individual tests print output folder location
rgbecker
parents: 2332
diff changeset
    13
from reportlab.test.utils import makeSuiteForClasses, outputfile, printLocation
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
    14
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    15
from reportlab.platypus.flowables import Flowable
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    16
from reportlab.lib import colors
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    17
from reportlab.lib.units import cm
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    18
from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    19
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    20
from reportlab.platypus.paragraph import Paragraph
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    21
from reportlab.platypus.frames import Frame
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    22
from reportlab.lib.randomtext import randomText, PYTHON
2659
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
    23
from reportlab.platypus.doctemplate import PageTemplate, BaseDocTemplate, Indenter, SimpleDocTemplate
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    24
from reportlab.platypus.paragraph import *
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    25
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    26
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    27
def myMainPageFrame(canvas, doc):
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    28
    "The page frame used for all PDF documents."
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    29
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    30
    canvas.saveState()
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    31
    canvas.setFont('Times-Roman', 12)
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    32
    pageNumber = canvas.getPageNumber()
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    33
    canvas.drawString(10*cm, cm, str(pageNumber))
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    34
    canvas.restoreState()
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    35
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    36
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    37
class MyDocTemplate(BaseDocTemplate):
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    38
    _invalidInitArgs = ('pageTemplates',)
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    39
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    40
    def __init__(self, filename, **kw):
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    41
        frame1 = Frame(2.5*cm, 15.5*cm, 6*cm, 10*cm, id='F1')
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    42
        frame2 = Frame(11.5*cm, 15.5*cm, 6*cm, 10*cm, id='F2')
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    43
        frame3 = Frame(2.5*cm, 2.5*cm, 6*cm, 10*cm, id='F3')
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    44
        frame4 = Frame(11.5*cm, 2.5*cm, 6*cm, 10*cm, id='F4')
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    45
        self.allowSplitting = 0
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    46
        self.showBoundary = 1
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    47
        apply(BaseDocTemplate.__init__, (self, filename), kw)
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    48
        template = PageTemplate('normal', [frame1, frame2, frame3, frame4], myMainPageFrame)
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    49
        self.addPageTemplates(template)
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    50
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    51
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    52
_text1='''Furthermore, the fundamental error of regarding functional notions as
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    53
categorial delimits a general convention regarding the forms of the
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    54
grammar.  I suggested that these results would follow from the
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    55
assumption that the descriptive power of the base component may remedy
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    56
and, at the same time, eliminate a descriptive fact.  Thus a subset of
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    57
English sentences interesting on quite independent grounds raises
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    58
serious doubts about the ultimate standard that determines the accuracy
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    59
of any proposed grammar.  Of course, the natural general principle that
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    60
will subsume this case can be defined in such a way as to impose the
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    61
strong generative capacity of the theory.  By combining adjunctions and
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    62
certain deformations, the descriptive power of the base component is not
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    63
subject to the levels of acceptability from fairly high (e.g. (99a)) to
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    64
virtual gibberish (e.g. (98d)).
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    65
'''
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
    66
def _test0(self):
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    67
    "This makes one long multi-page paragraph."
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
    68
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    69
    # Build story.
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    70
    story = []
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    71
    a = story.append
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    72
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    73
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    74
    styleSheet = getSampleStyleSheet()
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    75
    h1 = styleSheet['Heading1']
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    76
    h1.pageBreakBefore = 1
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    77
    h1.keepWithNext = 1
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    78
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    79
    h2 = styleSheet['Heading2']
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    80
    h2.frameBreakBefore = 1
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    81
    h2.keepWithNext = 1
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
    82
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    83
    h3 = styleSheet['Heading3']
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    84
    h3.backColor = colors.cyan
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    85
    h3.keepWithNext = 1
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    86
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    87
    bt = styleSheet['BodyText']
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    88
    a(Paragraph("""
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    89
        Subsequent pages test pageBreakBefore, frameBreakBefore and
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    90
        keepTogether attributes.  Generated at %s.  The number in brackets
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    91
        at the end of each paragraph is its position in the story. (%d)""" % (
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    92
            time.ctime(time.time()), len(story)), bt))
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
    93
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    94
    for i in range(10):
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    95
        a(Paragraph('Heading 1 always starts a new page (%d)' % len(story), h1))
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    96
        for j in range(3):
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
    97
            a(Paragraph('Heading1 paragraphs should always'
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    98
                            'have a page break before.  Heading 2 on the other hand'
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
    99
                            'should always have a FRAME break before (%d)' % len(story), bt))
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   100
            a(Paragraph('Heading 2 always starts a new frame (%d)' % len(story), h2))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   101
            a(Paragraph('Heading1 paragraphs should always'
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   102
                            'have a page break before.  Heading 2 on the other hand'
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   103
                            'should always have a FRAME break before (%d)' % len(story), bt))
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   104
            for j in range(3):
2664
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   105
                a(Paragraph(randomText(theme=PYTHON, sentences=2)+' (%d)' % len(story), bt))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   106
                a(Paragraph('I should never be at the bottom of a frame (%d)' % len(story), h3))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   107
                a(Paragraph(randomText(theme=PYTHON, sentences=1)+' (%d)' % len(story), bt))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   108
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   109
    a(Paragraph('Now we do &lt;br/&gt; tests', h1))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   110
    a(Paragraph('First off no br tags',h3))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   111
    a(Paragraph(_text1,bt))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   112
    a(Paragraph("&lt;br/&gt; after 'the' in line 4",h3))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   113
    a(Paragraph(_text1.replace('forms of the','forms of the<br/>',1),bt))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   114
    a(Paragraph("2*&lt;br/&gt; after 'the' in line 4",h3))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   115
    a(Paragraph(_text1.replace('forms of the','forms of the<br/><br/>',1),bt))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   116
    a(Paragraph("&lt;br/&gt; after 'I suggested ' in line 5",h3))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   117
    a(Paragraph(_text1.replace('I suggested ','I suggested<br/>',1),bt))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   118
    a(Paragraph("2*&lt;br/&gt; after 'I suggested ' in line 5",h3))
c9faa3a99e93 reportlab/platypus: <br/> tags now working
rgbecker
parents: 2660
diff changeset
   119
    a(Paragraph(_text1.replace('I suggested ','I suggested<br/><br/>',1),bt))
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
   120
2268
a51a4b6873c8 Move to having all test output in a temp folder
rgbecker
parents: 1683
diff changeset
   121
    doc = MyDocTemplate(outputfile('test_platypus_breaking.pdf'))
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   122
    doc.multiBuild(story)
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
   123
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
   124
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
   125
class BreakingTestCase(unittest.TestCase):
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   126
    "Test multi-page splitting of paragraphs (eyeball-test)."
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   127
    def test0(self):
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   128
        _test0(self)
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
   129
2659
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   130
    def test1(self):
2660
c147aff8edae reportlab: minor fixes and add strokeDashArray
rgbecker
parents: 2659
diff changeset
   131
        '''Ilpo Nyyss\xf6nen posted this broken test'''
2659
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   132
        normalStyle = ParagraphStyle(name = 'normal')
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   133
        keepStyle = ParagraphStyle(name = 'keep', keepWithNext = True)
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   134
        content = [
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   135
            Paragraph("line 1", keepStyle),
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   136
            Indenter(left = 1 * cm),
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   137
            Paragraph("line 2", normalStyle),
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   138
            ]
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   139
        doc = SimpleDocTemplate(outputfile('test_platypus_breaking1.pdf'))
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   140
        doc.build(content)
08af1b8a5d05 add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
rgbecker
parents: 2505
diff changeset
   141
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
   142
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
   143
def makeSuite():
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
   144
    return makeSuiteForClasses(BreakingTestCase)
1424
5a0ceec0c421 KeepWithNext experiments
andy_robinson
parents:
diff changeset
   145
1667
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
   146
dfe2f821f4e2 Slightly refactored test suite to do the same thing with less code.
dinu_gherman
parents: 1440
diff changeset
   147
#noruntests
1427
5cdd8fa1458a Allowed for dubgging runs
rgbecker
parents: 1424
diff changeset
   148
if __name__ == "__main__": #NORUNTESTS
1677
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   149
    if 'debug' in sys.argv:
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   150
        _test0(None)
1450177dd19e Exterminated all tab characters and added a test to make sure
andy_robinson
parents: 1667
diff changeset
   151
    else:
2268
a51a4b6873c8 Move to having all test output in a temp folder
rgbecker
parents: 1683
diff changeset
   152
        unittest.TextTestRunner().run(makeSuite())
2505
0859d48c2558 reportlab/test: fix so individual tests print output folder location
rgbecker
parents: 2332
diff changeset
   153
        printLocation()