| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
|
| index dd8fa4a9f9cc1cfab0b14e533df852e370532831..7626442375fcd4c8e13d6441fa57a6413753d431 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
|
| @@ -48,6 +48,9 @@ class FakePort(object):
|
| self.host.ports_parsed.append(self.name)
|
| return {self.path: ''}
|
|
|
| + def all_expectations_dict(self):
|
| + return self.expectations_dict()
|
| +
|
| def bot_expectations(self):
|
| return {}
|
|
|
| @@ -139,6 +142,27 @@ class LintTest(unittest.TestCase):
|
| self.assertIn('foo:1', logging_stream.getvalue())
|
| self.assertIn('bar:1', logging_stream.getvalue())
|
|
|
| + def test_lint_flag_specific_expectation_errors(self):
|
| + options = optparse.Values({'platform': 'test', 'debug_rwt_logging': False})
|
| + host = MockHost()
|
| +
|
| + # FIXME: incorrect complaints about spacing pylint: disable=C0322
|
| + port = host.port_factory.get(options.platform, options=options)
|
| + port.expectations_dict = lambda: {'flag-specific': 'does/not/exist', 'noproblem': ''}
|
| +
|
| + host.port_factory.get = lambda platform, options=None: port
|
| + host.port_factory.all_port_names = lambda platform=None: [port.name()]
|
| +
|
| + logging_stream = StringIO.StringIO()
|
| + logger, handler = lint_test_expectations.set_up_logging(logging_stream)
|
| + try:
|
| + res = lint_test_expectations.lint(host, options)
|
| + finally:
|
| + lint_test_expectations.tear_down_logging(logger, handler)
|
| +
|
| + self.assertTrue(res)
|
| + self.assertIn('flag-specific:1 Path does not exist. does/not/exist', logging_stream.getvalue())
|
| + self.assertNotIn('noproblem', logging_stream.getvalue())
|
|
|
| class CheckVirtualSuiteTest(unittest.TestCase):
|
|
|
|
|