Changeset 89944 in webkit


Ignore:
Timestamp:
Jun 28, 2011 11:29:17 AM (13 years ago)
Author:
rolandsteiner@chromium.org
Message:

2011-06-28 Roland Steiner <rolandsteiner@chromium.org>

Reviewed by Tony Chang.

Fix filesystem_unittest.FileSystemTest test_read_and_write_file()
https://bugs.webkit.org/show_bug.cgi?id=63514

  • change write_text_file to write_binary_file
  • check that text_path and binary_path are actually existant files
  • change cleanup block from 'except' to 'finally'
  • Scripts/webkitpy/common/system/filesystem_unittest.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r89926 r89944  
     12011-06-28  Roland Steiner  <rolandsteiner@chromium.org>
     2
     3        Reviewed by Tony Chang.
     4
     5        Fix filesystem_unittest.FileSystemTest test_read_and_write_file()
     6        https://bugs.webkit.org/show_bug.cgi?id=63514
     7
     8        - change write_text_file to write_binary_file
     9        - check that text_path and binary_path are actually existant files
     10        - change cleanup block from 'except' to 'finally'
     11
     12        * Scripts/webkitpy/common/system/filesystem_unittest.py:
     13
    1142011-06-28  Adam Roben  <aroben@apple.com>
    215
  • trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py

    r83631 r89944  
    157157            self.assertEqual(contents, hex_equivalent)
    158158
    159             fs.write_text_file(binary_path, hex_equivalent)
     159            fs.write_binary_file(binary_path, hex_equivalent)
    160160            text_contents = fs.read_text_file(binary_path)
    161161            self.assertEqual(text_contents, unicode_text_string)
    162         except:
    163             if text_path:
     162        finally:
     163            if text_path and fs.isfile(text_path):
    164164                os.remove(text_path)
    165             if binary_path:
     165            if binary_path and fs.isfile(binary_path):
    166166                os.remove(binary_path)
    167167
Note: See TracChangeset for help on using the changeset viewer.