Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py

Issue 2329263002: Run format-webkitpy and fix long lines. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index e3493e03ff7e40b94d24f77531530d12c65ce75c..5dbff14fb2249e381c4ee9643d372fc81c7d7916 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -257,8 +257,10 @@ Bug(user) reftests/failures/expected/needsmanualrebaseline_with_txt.html [ Needs
""", is_lint_mode=True)
self.assertFalse(True, "ParseError wasn't raised")
except ParseError as e:
- warnings = """expectations:1 A reftest without text expectation cannot be marked as NeedsRebaseline/NeedsManualRebaseline reftests/failures/expected/needsrebaseline.html
-expectations:3 A reftest without text expectation cannot be marked as NeedsRebaseline/NeedsManualRebaseline reftests/failures/expected/needsmanualrebaseline.html"""
+ warnings = ('expectations:1 A reftest without text expectation cannot be marked as '
+ 'NeedsRebaseline/NeedsManualRebaseline reftests/failures/expected/needsrebaseline.html\n'
+ 'expectations:3 A reftest without text expectation cannot be marked as '
+ 'NeedsRebaseline/NeedsManualRebaseline reftests/failures/expected/needsmanualrebaseline.html')
self.assertEqual(str(e), warnings)
def test_parse_warning(self):
@@ -289,15 +291,21 @@ expectations:3 A reftest without text expectation cannot be marked as NeedsRebas
def test_error_on_different_platform(self):
# parse_exp uses a Windows port. Assert errors on Mac show up in lint mode.
- self.assertRaises(ParseError, self.parse_exp,
- 'Bug(test) [ Mac ] failures/expected/text.html [ Failure ]\nBug(test) [ Mac ] failures/expected/text.html [ Failure ]',
- is_lint_mode=True)
+ self.assertRaises(
+ ParseError,
+ self.parse_exp,
+ ('Bug(test) [ Mac ] failures/expected/text.html [ Failure ]\n'
+ 'Bug(test) [ Mac ] failures/expected/text.html [ Failure ]'),
+ is_lint_mode=True)
def test_error_on_different_build_type(self):
# parse_exp uses a Release port. Assert errors on DEBUG show up in lint mode.
- self.assertRaises(ParseError, self.parse_exp,
- 'Bug(test) [ Debug ] failures/expected/text.html [ Failure ]\nBug(test) [ Debug ] failures/expected/text.html [ Failure ]',
- is_lint_mode=True)
+ self.assertRaises(
+ ParseError,
+ self.parse_exp,
+ ('Bug(test) [ Debug ] failures/expected/text.html [ Failure ]\n'
+ 'Bug(test) [ Debug ] failures/expected/text.html [ Failure ]'),
+ is_lint_mode=True)
def test_overrides(self):
self.parse_exp("Bug(exp) failures/expected/text.html [ Failure ]",
@@ -489,14 +497,21 @@ class ExpectationSyntaxTests(Base):
'Only SLOW expectations are allowed in SlowTests'], filename='SlowTests')
def test_wontfix(self):
- self.assert_tokenize_exp('foo.html [ WontFix ]', specifiers=[], expectations=['WONTFIX', 'SKIP'], warnings=[
- 'WONTFIX tests should ony be added to NeverFixTests or StaleTestExpectations and not to TestExpectations.'])
- self.assert_tokenize_exp('foo.html [ WontFix Failure ]', specifiers=[], expectations=['WONTFIX', 'SKIP'], warnings=[
- 'A test marked Skip or WontFix must not have other expectations.', 'WONTFIX tests should ony be added to NeverFixTests or StaleTestExpectations and not to TestExpectations.'])
- self.assert_tokenize_exp('foo.html [ WontFix Failure ]', specifiers=[], expectations=['WONTFIX', 'SKIP'], warnings=[
- 'A test marked Skip or WontFix must not have other expectations.', 'Only WONTFIX expectations are allowed in NeverFixTests'], filename='NeverFixTests')
- self.assert_tokenize_exp('foo.html [ WontFix Timeout ]', specifiers=[], expectations=['WONTFIX', 'TIMEOUT'], warnings=[
- 'A test marked Skip or WontFix must not have other expectations.', 'Only WONTFIX expectations are allowed in NeverFixTests'], filename='NeverFixTests')
+ self.assert_tokenize_exp(
+ 'foo.html [ WontFix ]', specifiers=[], expectations=['WONTFIX', 'SKIP'], warnings=[
+ 'WONTFIX tests should ony be added to NeverFixTests or StaleTestExpectations and not to TestExpectations.'])
+ self.assert_tokenize_exp(
+ 'foo.html [ WontFix Failure ]', specifiers=[], expectations=['WONTFIX', 'SKIP'], warnings=[
+ 'A test marked Skip or WontFix must not have other expectations.',
+ 'WONTFIX tests should ony be added to NeverFixTests or StaleTestExpectations and not to TestExpectations.'])
+ self.assert_tokenize_exp(
+ 'foo.html [ WontFix Failure ]', specifiers=[], expectations=['WONTFIX', 'SKIP'], warnings=[
+ 'A test marked Skip or WontFix must not have other expectations.',
+ 'Only WONTFIX expectations are allowed in NeverFixTests'], filename='NeverFixTests')
+ self.assert_tokenize_exp(
+ 'foo.html [ WontFix Timeout ]', specifiers=[], expectations=['WONTFIX', 'TIMEOUT'], warnings=[
+ 'A test marked Skip or WontFix must not have other expectations.',
+ 'Only WONTFIX expectations are allowed in NeverFixTests'], filename='NeverFixTests')
def test_blank_line(self):
self.assert_tokenize_exp('', name=None)
@@ -618,7 +633,8 @@ class RemoveConfigurationsTest(Base):
test_port.test_isfile = lambda test: True
test_config = test_port.test_configuration()
- test_port.expectations_dict = lambda: {"expectations": """Bug(x) [ Linux Win Release ] failures/expected/foo.html [ Failure ]
+ test_port.expectations_dict = lambda: {
+ "expectations": """Bug(x) [ Linux Win Release ] failures/expected/foo.html [ Failure ]
Bug(y) [ Win Mac Debug ] failures/expected/foo.html [ Crash ]
"""}
expectations = TestExpectations(test_port, self.get_basic_tests())

Powered by Google App Engine
This is Rietveld 408576698