Changeset 3193

Show
Ignore:
Timestamp:
06/21/07 13:39:18 (2 years ago)
Author:
paul
Message:

Fixed dReportWriter test to work (at some point, I changed the testcursor to not use literal strings). Made dPdfWindow's test run the dReportWriter test to have a test pdf file to display.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dReportWriter.py

    r3054 r3193  
    2525            v = self._encoding 
    2626        except AttributeError: 
    27             v = self._encoding = self.Application.Encoding 
     27            if self.Application: 
     28                v = self.Application.Encoding 
     29            else: 
     30                v = "utf-8" 
     31            self._encoding = v 
    2832        return v 
    2933 
     
    6771 
    6872    <testcursor iid="int" cArtist="str"> 
    69         <record iid="1" cArtist="The Clash" /> 
    70         <record iid="2" cArtist="Queen" /> 
    71         <record iid="3" cArtist="Metallica" /> 
    72         <record iid="3" cArtist="The Boomtown Rats" /> 
     73        <record iid="1" cArtist='"The Clash"' /> 
     74        <record iid="2" cArtist='"Queen"' /> 
     75        <record iid="3" cArtist='"Metallica"' /> 
     76        <record iid="3" cArtist='"The Boomtown Rats"' /> 
    7377    </testcursor> 
    7478 
  • trunk/dabo/ui/uiwx/dPdfWindow.py

    r3192 r3193  
    11# -*- coding: utf-8 -*- 
     2import os 
    23import wx 
    34import dabo 
     
    3738 
    3839class _dPdfWindow_test(dPdfWindow): 
    39     pass 
     40    def afterInit(self): 
     41        # Run the dReportWriter test, which will output a test  
     42        # pdf in this directory, and load that into the dPdfWindow: 
     43        os.system("python ../../dReportWriter.py") 
     44        self.LoadFile(os.path.abspath("dRW-test.pdf")) 
    4045 
    4146