| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
|
| index 5cfa0f89a202014bf51a69f7e80bc01799e0eda3..233fc039fcec054053797918daf42b679b3d9470 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
|
| @@ -175,10 +175,12 @@ class TestExpectationParser(object):
|
| if self._port.reference_files(test):
|
| text_expected_filename = self._port.expected_filename(test, '.txt')
|
| if not self._port.host.filesystem.exists(text_expected_filename):
|
| - expectation_line.warnings.append('A reftest without text expectation cannot be marked as NeedsRebaseline/NeedsManualRebaseline')
|
| + expectation_line.warnings.append(
|
| + 'A reftest without text expectation cannot be marked as NeedsRebaseline/NeedsManualRebaseline')
|
|
|
| specifiers = [specifier.lower() for specifier in expectation_line.specifiers]
|
| - if (self.REBASELINE_MODIFIER in expectations or self.NEEDS_REBASELINE_MODIFIER in expectations) and ('debug' in specifiers or 'release' in specifiers):
|
| + if (self.REBASELINE_MODIFIER in expectations or self.NEEDS_REBASELINE_MODIFIER in expectations) and (
|
| + 'debug' in specifiers or 'release' in specifiers):
|
| expectation_line.warnings.append('A test cannot be rebaselined for Debug/Release.')
|
|
|
| def _parse_expectations(self, expectation_line):
|
| @@ -295,9 +297,9 @@ class TestExpectationParser(object):
|
| state = 'start'
|
| for token in tokens:
|
| if (token.startswith(WEBKIT_BUG_PREFIX) or
|
| - token.startswith(CHROMIUM_BUG_PREFIX) or
|
| - token.startswith(V8_BUG_PREFIX) or
|
| - token.startswith(NAMED_BUG_PREFIX)):
|
| + token.startswith(CHROMIUM_BUG_PREFIX) or
|
| + token.startswith(V8_BUG_PREFIX) or
|
| + token.startswith(NAMED_BUG_PREFIX)):
|
| if state != 'start':
|
| warnings.append('"%s" is not at the start of the line.' % token)
|
| break
|
| @@ -364,7 +366,8 @@ class TestExpectationParser(object):
|
| warnings.append('SLOW tests should ony be added to SlowTests and not to TestExpectations.')
|
|
|
| if 'WONTFIX' in expectations and ('NeverFixTests' not in filename and 'StaleTestExpectations' not in filename):
|
| - warnings.append('WONTFIX tests should ony be added to NeverFixTests or StaleTestExpectations and not to TestExpectations.')
|
| + warnings.append(
|
| + 'WONTFIX tests should ony be added to NeverFixTests or StaleTestExpectations and not to TestExpectations.')
|
|
|
| if 'NeverFixTests' in filename and expectations != ['WONTFIX', 'SKIP']:
|
| warnings.append('Only WONTFIX expectations are allowed in NeverFixTests')
|
| @@ -410,7 +413,8 @@ class TestExpectationLine(object):
|
| self.is_skipped_outside_expectations_file = False
|
|
|
| def __str__(self):
|
| - return "TestExpectationLine{name=%s, matching_configurations=%s, original_string=%s}" % (self.name, self.matching_configurations, self.original_string)
|
| + return "TestExpectationLine{name=%s, matching_configurations=%s, original_string=%s}" % (
|
| + self.name, self.matching_configurations, self.original_string)
|
|
|
| def __eq__(self, other):
|
| return (self.original_string == other.original_string
|
| @@ -527,7 +531,8 @@ class TestExpectationLine(object):
|
| return expectations
|
|
|
| @staticmethod
|
| - def _format_line(bugs, specifiers, name, expectations, comment, include_specifiers=True, include_expectations=True, include_comment=True):
|
| + def _format_line(bugs, specifiers, name, expectations, comment, include_specifiers=True,
|
| + include_expectations=True, include_comment=True):
|
| new_specifiers = []
|
| new_expectations = []
|
| for specifier in specifiers:
|
| @@ -910,7 +915,8 @@ class TestExpectations(object):
|
|
|
| if result in expected_results:
|
| return True
|
| - if result in (PASS, TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO, MISSING) and (NEEDS_REBASELINE in expected_results or NEEDS_MANUAL_REBASELINE in expected_results):
|
| + if result in (PASS, TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO, MISSING) and (
|
| + NEEDS_REBASELINE in expected_results or NEEDS_MANUAL_REBASELINE in expected_results):
|
| return True
|
| if result in (TEXT, IMAGE, IMAGE_PLUS_TEXT, AUDIO) and (FAIL in expected_results):
|
| return True
|
| @@ -976,7 +982,8 @@ class TestExpectations(object):
|
| # FIXME: This constructor does too much work. We should move the actual parsing of
|
| # the expectations into separate routines so that linting and handling overrides
|
| # can be controlled separately, and the constructor can be more of a no-op.
|
| - def __init__(self, port, tests=None, include_overrides=True, expectations_dict=None, model_all_expectations=False, is_lint_mode=False):
|
| + def __init__(self, port, tests=None, include_overrides=True, expectations_dict=None,
|
| + model_all_expectations=False, is_lint_mode=False):
|
| self._full_test_list = tests
|
| self._test_config = port.test_configuration()
|
| self._is_lint_mode = is_lint_mode
|
|
|