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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py

Issue 2291193004: In update-w3c-test-expectations, handle non-existent/non-test files. (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py
index 85e340d108632c295b7c7f9e97973e77cc5b7fed..56735b3f5ee3ffb239b9f7508f8c3fa90158cd8f 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py
@@ -201,7 +201,6 @@ CONTENT OF TEST
test_path = '/some/madeup/path/'
parser = TestParser(test_path + 'somefile.html', MockHost(), options)
test_info = parser.analyze_test(test_contents=test_html)
-
self.assertEqual(test_info, None, 'test should have been skipped')
def test_analyze_non_html_file(self):
@@ -210,3 +209,9 @@ CONTENT OF TEST
parser = TestParser(os.path.join(os.path.dirname(__file__), 'test_parser.py'), MockHost())
test_info = parser.analyze_test()
self.assertEqual(test_info, None, 'no tests should have been found in this file')
+
+ def test_parser_initialization_non_existent_file(self):
+ parser = TestParser('some/bogus/path.html', MockHost())
+ self.assertEqual(parser.filename, 'some/bogus/path.html')
+ self.assertIsNone(parser.test_doc)
+ self.assertIsNone(parser.ref_doc)
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698