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

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

Issue 1970963002: Check for and skip long paths when importing w3c tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 85601e371c152d4ab7e0bfe4706b60dc105f7ea5..6fdfc2fd4f0a0d54913bad431cae0a12914d471b 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
@@ -47,14 +47,25 @@ FAKE_FILES = {
class TestImporterTest(unittest.TestCase):
+ @staticmethod
+ def options(**kwargs):
+ """Returns a set of option values for TestImporter."""
+ options = {
+ "overwrite": False,
+ "destination": "w3c",
+ "ignore_expectations": False,
+ }
+ options.update(kwargs)
+ return optparse.Values(options)
+
def test_import_dir_with_no_tests(self):
host = MockHost()
host.executive = MockExecutive2(exception=ScriptError(
"abort: no repository found in '/Volumes/Source/src/wk/Tools/Scripts/webkitpy/w3c'"))
host.filesystem = MockFileSystem(files=FAKE_FILES)
- importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, optparse.Values(
- {"overwrite": False, 'destination': 'w3c', 'ignore_expectations': False}))
+ importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.options())
+
oc = OutputCapture()
oc.capture_output()
try:
@@ -62,4 +73,12 @@ class TestImporterTest(unittest.TestCase):
finally:
oc.restore_output()
+ def test_path_too_long_true(self):
+ importer = TestImporter(MockHost(), FAKE_SOURCE_DIR, FAKE_REPO_DIR, self.options())
+ self.assertTrue(importer.path_too_long(FAKE_REPO_DIR + '/' + ('x' * 150) + '.html'))
+
+ def test_path_too_long_false(self):
+ 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.
« 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