Beispiel #1
0
 def test_rl_config_reset(self):
     from reportlab import rl_config
     from reportlab.pdfbase import pdfmetrics, _fontdata
     tfd = pdfmetrics._typefaces
     fbn = _fontdata.fontsByName
     tfd[' a ']=1
     fbn[' b ']=1
     ntfd = len(tfd)
     nfbn = len(fbn)
     from reportlab.lib import sequencer
     seq = sequencer.getSequencer()
     seq._dingo = 1
     rl_config._reset()
     assert not hasattr(seq,'_dingo')
     assert ' a ' not in tfd and len(tfd)<ntfd
     assert ' a ' not in fbn and len(fbn)<nfbn
Beispiel #2
0
 def test_rl_config_reset(self):
     from reportlab import rl_config
     from reportlab.pdfbase import pdfmetrics, _fontdata
     tfd = pdfmetrics._typefaces
     fbn = _fontdata.fontsByName
     tfd[' a '] = 1
     fbn[' b '] = 1
     ntfd = len(tfd)
     nfbn = len(fbn)
     from reportlab.lib import sequencer
     seq = sequencer.getSequencer()
     seq._dingo = 1
     rl_config._reset()
     assert not hasattr(seq, '_dingo')
     assert ' a ' not in tfd and len(tfd) < ntfd
     assert ' a ' not in fbn and len(fbn) < nfbn
Beispiel #3
0
 def render_pdf(self):
     logging.debug("render_pdf: Saving")
     self.canvas.save()
     rl_config._reset()