Title: [89944] trunk/Tools
Revision
89944
Author
[email protected]
Date
2011-06-28 11:29:17 -0700 (Tue, 28 Jun 2011)

Log Message

2011-06-28  Roland Steiner  <[email protected]>

        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:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (89943 => 89944)


--- trunk/Tools/ChangeLog	2011-06-28 18:26:06 UTC (rev 89943)
+++ trunk/Tools/ChangeLog	2011-06-28 18:29:17 UTC (rev 89944)
@@ -1,3 +1,16 @@
+2011-06-28  Roland Steiner  <[email protected]>
+
+        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:
+
 2011-06-28  Adam Roben  <[email protected]>
 
         Roll out r89924 and r89925

Modified: trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py (89943 => 89944)


--- trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py	2011-06-28 18:26:06 UTC (rev 89943)
+++ trunk/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py	2011-06-28 18:29:17 UTC (rev 89944)
@@ -156,13 +156,13 @@
             contents = fs.read_binary_file(text_path)
             self.assertEqual(contents, hex_equivalent)
 
-            fs.write_text_file(binary_path, hex_equivalent)
+            fs.write_binary_file(binary_path, hex_equivalent)
             text_contents = fs.read_text_file(binary_path)
             self.assertEqual(text_contents, unicode_text_string)
-        except:
-            if text_path:
+        finally:
+            if text_path and fs.isfile(text_path):
                 os.remove(text_path)
-            if binary_path:
+            if binary_path and fs.isfile(binary_path):
                 os.remove(binary_path)
 
     def test_read_binary_file__missing(self):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to