Sections
Timeline
View Tickets
New Ticket
Sub-Sections
Download
Unified Diff
Zip Archive
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Changeset 48

Show
Ignore:
Timestamp:
23/08/08 07:42:00 (3 months ago)
Author:
gak
Message:
  • Minor test fixes
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/test/test.py

    r46 r48  
    2121        # All tests require warnings to be raised 
    2222        self.raise_warnings(True) 
     23 
     24        self.temp_image = 'temp.png' 
     25 
     26    def tearDown(self): 
     27        if os.exists(self.temp_image): 
     28            os.unlink(self.temp_image) 
    2329 
    2430    def raise_warnings(self, rw): 
     
    116122            return 
    117123 
    118         fn = 'temp.png' 
    119         chart.download(fn) 
    120         status, string = PyQrcodec.decode(fn) 
     124        chart.download(self.temp_image) 
     125        status, string = PyQrcodec.decode(self.temp_image) 
    121126        self.assertTrue(status) 
    122127        self.assertEquals(text, string) 
     
    147152 
    148153    def test_validate_utf8(self): 
    149         text = 'こんにちは䞖界'  # Hello world in Japanese UTF8 
     154        text = 'こんにちは䞖界'  # Hello world in Japanese UTF-8 
    150155        chart = gc.QRChart(100, 100) 
    151156        chart.add_data(text) 
     
    163168            '?cht=qr&chs=100x100&chl=%82%B1%82%F1%82%C9' \ 
    164169            '%82%BF%82%CD%90%A2%8AE&choe=Shift_JIS&chld=H|0') 
    165         chart.download('temp.png') 
     170        chart.download(self.temp_image) 
    166171 
    167172