Chromium Code Reviews| Index: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_walk_unittest.py |
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_walk_unittest.py |
| similarity index 88% |
| copy from third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py |
| copy to third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_walk_unittest.py |
| index 561959ad5610989b637af3d5c0ee344c251afb2b..c0abdc462041f847709e988f99cd6d65f8fcdb7d 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_walk_unittest.py |
| @@ -28,10 +28,17 @@ |
| import unittest |
| - |
| +from webkitpy.common.host_mock import MockHost |
| from webkitpy.common.system import filesystem_mock |
| +from webkitpy.common.system.filesystem_mock import MockFileSystem |
| from webkitpy.common.system import filesystem_unittest |
| +MOCK_DIR = 'foo' |
| +MOCK_FILES = {'foo/bar/baz': '', |
| + 'foo/a': '', |
| + 'foo/b': '', |
| + 'foo/c': ''} |
|
qyearsley
2016/06/01 23:08:43
These don't have to be globals now; they could be
|
| + |
| class MockFileSystemTest(unittest.TestCase, filesystem_unittest.GenericFileSystemTests): |
| @@ -84,3 +91,9 @@ class MockFileSystemTest(unittest.TestCase, filesystem_unittest.GenericFileSyste |
| def test_relpath_win32(self): |
| pass |
| + |
| + def test_filesystem_walk(self): |
|
qyearsley
2016/06/01 23:08:43
I'm not quite sure whether this walk method will w
|
| + host = MockHost() |
| + host.filesystem = MockFileSystem(files=MOCK_FILES) |
| + host.filesystem.walk(MOCK_DIR) |
|
qyearsley
2016/06/01 23:08:43
self.assertEqual(
[
('foo', ['bar'], [
|
| + self.assertTrue(False) |
|
qyearsley
2016/06/01 23:08:43
This line should be removed.
|