[Webkit-unassigned] [Bug 49835] Ignore reference files which will be used by reftests when collecting test cases.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 19 17:25:03 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=49835
--- Comment #5 from Dirk Pranke <dpranke at chromium.org> 2010-11-19 17:25:03 PST ---
(From update of attachment 74426)
View in context: https://bugs.webkit.org/attachment.cgi?id=74426&action=review
> WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py:123
> + in _ignored_suffixes):
I actually think the any() is fine, but the variable names make it a bit hard to read. I'd use:
if any(filename.endswith(suffix) for suffix in _ignored_suffixes):
_log.warn(...)
return True
return False
I would also consider renaming is_ignored_file to is_reftest and moving the _ignored_suffixes constant inside the function.
You could get away with:
def _is_reftest(filename):
return (filename.endswith('-expected.html') or
filename.endswith('-expected-mismatch.html'))
Slightly less generic, but a lot easier to read and understand.
>> WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py:124
>> + _log.warn('Reftests is not suuperted yet. %s is ignored.', filename)
>
> "Reftest is not" ?
_log.warn("Ignoring %s - reftests are not supported." % filename)
or
_log.warn("Reftests are not supported - ignoring %s" % filename)
depending on which aspect you want to emphasize.
> WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py:131
> + on."""
I'm not sure that a docstring really adds anything here, but if you really wanted one, you could have "Return True if the filename points to a test file."
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list