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

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

Issue 2032943003: Import owners bug fix and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change test_importer.py to skip importing files named OWNERS Created 4 years, 7 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 | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | 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_importer_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
index 6fdfc2fd4f0a0d54913bad431cae0a12914d471b..2a00882164dffeceb32087f607b924b62e2aa4c6 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
@@ -38,11 +38,13 @@ from webkitpy.w3c.test_importer import TestImporter
FAKE_SOURCE_DIR = '/blink/w3c'
FAKE_REPO_DIR = '/blink'
-FAKE_FILES = {
- '/blink/w3c/empty_dir/README.txt': '',
- '/mock-checkout/third_party/WebKit/LayoutTests/w3c/README.txt': '',
- '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
-}
+FAKE_FILES = {'/mock-checkout/third_party/Webkit/LayoutTests/w3c/OWNERS': '',
+ '/blink/w3c/dir/README.txt': '',
+ '/blink/w3c/dir/OWNERS': '',
+ '/blink/w3c/dir1/OWNERS': '',
+ '/mock-checkout/third_party/WebKit/LayoutTests/w3c/README.txt': '',
+ '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': ''}
+
class TestImporterTest(unittest.TestCase):
@@ -81,4 +83,14 @@ class TestImporterTest(unittest.TestCase):
importer = TestImporter(MockHost(), FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.options())
self.assertFalse(importer.path_too_long(FAKE_REPO_DIR + '/x.html'))
- # FIXME: Needs more tests.
+ def test_does_not_import_owner_files(self):
+ host = MockHost()
+ host.filesystem = MockFileSystem(files=FAKE_FILES)
+ importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.options())
+ importer.find_importable_tests(FAKE_REPO_DIR)
+ self.assertEqual(importer.import_list,
+ [{'copy_list': [{'dest': 'README.txt', 'src': '/blink/w3c/dir/README.txt'}],
+ 'dirname': '/blink/w3c/dir',
+ 'jstests': 0,
+ 'reftests': 0,
+ 'total_tests': 0}])
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698