Summary: | Add skeleton parsing for a WatchList. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Levin <levin> | ||||||
Component: | Tools / Tests | Assignee: | David Levin <levin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 68822 | ||||||||
Attachments: |
|
Description
David Levin
2011-09-26 12:00:33 PDT
Created attachment 108716 [details]
Patch
Comment on attachment 108716 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108716&action=review > Tools/Scripts/webkitpy/tool/steps/applywatchlist.py:34 > +class WatchList: new-style classes (python 2.5 and above?) always subclass from (object) > Tools/Scripts/webkitpy/tool/steps/applywatchlist.py:46 > + # Parse the top level sections in the watch list. > + for section in watch_list: > + parser = watch_list_parsers.get(section) > + if not parse_method: > + raise Exception('Unknown section in watch list: %s' % section) > + parser(watch_list[section]) I would think you'd want a separate WatchListParser class or Factory class which could produce these, leaving WatchList to just be the model. > Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:38 > + def _verifyException(self, regex_message, callable, *args): > + try: Sad. Python 2.7 has something like this in unittest, but pre-2.7 doesn't. Created attachment 108720 [details]
Patch
Comment on attachment 108720 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108720&action=review > Tools/Scripts/webkitpy/common/watchlist/parsewatchlist.py:36 > +def parse_watch_list(watch_list_contents): Normally we'd name the package with a noun, so watchlistparser.py Committed as http://trac.webkit.org/changeset/95995 |