Changeset 95583 in webkit


Ignore:
Timestamp:
Sep 20, 2011 4:53:22 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Fix webkitpy unit tests after 95547 and 95549
https://bugs.webkit.org/show_bug.cgi?id=68483

Patch by Leandro Pereira <leandro@profusion.mobi> 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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r95581 r95583  
     12011-09-20  Leandro Pereira  <leandro@profusion.mobi>
     2
     3        Fix webkitpy unit tests after 95547 and 95549
     4        https://bugs.webkit.org/show_bug.cgi?id=68483
     5
     6        Reviewed by Adam Barth.
     7       
     8        Fix tests for ChangeLog.touched_files() and ChangeLog.parse_entries_from_file().
     9
     10        * Scripts/webkitpy/common/checkout/changelog_unittest.py: While testing
     11        parse_entries_from_file(), use StringIO and entry.reviewer_text().
     12        While testing parse_latest_entry_from_file(), expect the correct
     13        touched_files() list.
     14
    1152011-09-20  Adam Barth  <abarth@webkit.org>
    216
  • trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py

    r95549 r95583  
    155155
    156156    def test_parse_log_entries_from_changelog(self):
    157         parsed_entries = list(ChangeLog.parse_entries_from_changelog(ChangeLogTest._example_changelog))
     157        changelog_file = StringIO(self._example_changelog)
     158        parsed_entries = list(ChangeLog.parse_entries_from_file(changelog_file))
    158159        self.assertEquals(len(parsed_entries), 3)
    159         self.assertEquals(parsed_entries[0].reviewer(), 'David Levin')
    160         self.assertEquals(parsed_entries[1].author_email(), 'ddkilzer@apple.com')
    161         self.assertEquals(parsed_entries[2].touched_files(), ['DumpRenderTree/mac/DumpRenderTreeWindow.mm'])
     160        self.assertEquals(parsed_entries[0].reviewer_text(), "David Levin")
     161        self.assertEquals(parsed_entries[1].author_email(), "ddkilzer@apple.com")
     162        self.assertEquals(parsed_entries[2].touched_files(), ["DumpRenderTree/mac/DumpRenderTreeWindow.mm"])
    162163
    163164    def test_latest_entry_parse(self):
     
    169170        self.assertEquals(latest_entry.author_email(), "pkasting@google.com")
    170171        self.assertEquals(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
    171         self.assertEquals(latest_entry.touched_files(), ["Scripts/modules/cpp_style.py", "Scripts/modules/cpp_style_unittest.py"])
     172        self.assertEquals(latest_entry.touched_files(), ["DumpRenderTree/win/DumpRenderTree.vcproj", "DumpRenderTree/win/ImageDiff.vcproj", "DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj"])
     173
    172174        self.assertTrue(latest_entry.reviewer())  # Make sure that our UTF8-based lookup of Tor works.
    173175
Note: See TracChangeset for help on using the changeset viewer.