Title: [95583] trunk/Tools
- Revision
- 95583
- Author
- [email protected]
- Date
- 2011-09-20 16:53:22 -0700 (Tue, 20 Sep 2011)
Log Message
Fix webkitpy unit tests after 95547 and 95549
https://bugs.webkit.org/show_bug.cgi?id=68483
Patch by Leandro Pereira <[email protected]> on 2011-09-20
Reviewed by Adam Barth.
Fix tests for ChangeLog.touched_files() and ChangeLog.parse_entries_from_file().
* Scripts/webkitpy/common/checkout/changelog_unittest.py: While testing
parse_entries_from_file(), use StringIO and entry.reviewer_text().
While testing parse_latest_entry_from_file(), expect the correct
touched_files() list.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (95582 => 95583)
--- trunk/Tools/ChangeLog 2011-09-20 23:49:19 UTC (rev 95582)
+++ trunk/Tools/ChangeLog 2011-09-20 23:53:22 UTC (rev 95583)
@@ -1,3 +1,17 @@
+2011-09-20 Leandro Pereira <[email protected]>
+
+ Fix webkitpy unit tests after 95547 and 95549
+ https://bugs.webkit.org/show_bug.cgi?id=68483
+
+ Reviewed by Adam Barth.
+
+ Fix tests for ChangeLog.touched_files() and ChangeLog.parse_entries_from_file().
+
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py: While testing
+ parse_entries_from_file(), use StringIO and entry.reviewer_text().
+ While testing parse_latest_entry_from_file(), expect the correct
+ touched_files() list.
+
2011-09-20 Adam Barth <[email protected]>
garden-o-matic makes it hard to compare images when scroll bars appear
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py (95582 => 95583)
--- trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py 2011-09-20 23:49:19 UTC (rev 95582)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py 2011-09-20 23:53:22 UTC (rev 95583)
@@ -154,11 +154,12 @@
self.assertEquals(57354, parse_bug_id_from_changelog(commit_text))
def test_parse_log_entries_from_changelog(self):
- parsed_entries = list(ChangeLog.parse_entries_from_changelog(ChangeLogTest._example_changelog))
+ changelog_file = StringIO(self._example_changelog)
+ parsed_entries = list(ChangeLog.parse_entries_from_file(changelog_file))
self.assertEquals(len(parsed_entries), 3)
- self.assertEquals(parsed_entries[0].reviewer(), 'David Levin')
- self.assertEquals(parsed_entries[1].author_email(), '[email protected]')
- self.assertEquals(parsed_entries[2].touched_files(), ['DumpRenderTree/mac/DumpRenderTreeWindow.mm'])
+ self.assertEquals(parsed_entries[0].reviewer_text(), "David Levin")
+ self.assertEquals(parsed_entries[1].author_email(), "[email protected]")
+ self.assertEquals(parsed_entries[2].touched_files(), ["DumpRenderTree/mac/DumpRenderTreeWindow.mm"])
def test_latest_entry_parse(self):
changelog_contents = u"%s\n%s" % (self._example_entry, self._example_changelog)
@@ -168,7 +169,8 @@
self.assertEquals(latest_entry.author_name(), "Peter Kasting")
self.assertEquals(latest_entry.author_email(), "[email protected]")
self.assertEquals(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
- self.assertEquals(latest_entry.touched_files(), ["Scripts/modules/cpp_style.py", "Scripts/modules/cpp_style_unittest.py"])
+ self.assertEquals(latest_entry.touched_files(), ["DumpRenderTree/win/DumpRenderTree.vcproj", "DumpRenderTree/win/ImageDiff.vcproj", "DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj"])
+
self.assertTrue(latest_entry.reviewer()) # Make sure that our UTF8-based lookup of Tor works.
def test_latest_entry_parse_single_entry(self):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes