OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 import unittest | 7 import unittest |
8 | 8 |
9 from local_file_system import LocalFileSystem | 9 from local_file_system import LocalFileSystem |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 self.assertEqual( | 22 self.assertEqual( |
23 expected, | 23 expected, |
24 self._file_system.Read(['test1.txt', 'test2.txt', 'test3.txt']).Get()) | 24 self._file_system.Read(['test1.txt', 'test2.txt', 'test3.txt']).Get()) |
25 | 25 |
26 def testListDir(self): | 26 def testListDir(self): |
27 expected = ['dir/'] | 27 expected = ['dir/'] |
28 for i in range(7): | 28 for i in range(7): |
29 expected.append('file%d.html' % i) | 29 expected.append('file%d.html' % i) |
30 self.assertEqual(expected, | 30 self.assertEqual(expected, |
31 sorted(self._file_system.Read(['list/']).Get()['list/'])) | 31 sorted(self._file_system.ReadSingleFile('list/'))) |
32 | 32 |
33 if __name__ == '__main__': | 33 if __name__ == '__main__': |
34 unittest.main() | 34 unittest.main() |
OLD | NEW |