+2011-09-20 Leandro Pereira <leandro@profusion.mobi>
+
+ 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 <abarth@webkit.org>
garden-o-matic makes it hard to compare images when scroll bars appear
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(), 'ddkilzer@apple.com')
- 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(), "ddkilzer@apple.com")
+ 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)
self.assertEquals(latest_entry.author_name(), "Peter Kasting")
self.assertEquals(latest_entry.author_email(), "pkasting@google.com")
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):