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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py

Issue 1847613002: Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 # Copyright (C) 2009 Google Inc. All rights reserved. 1 # Copyright (C) 2009 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 14 matching lines...) Expand all
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 import StringIO 29 import StringIO
30 import errno 30 import errno
31 import hashlib 31 import hashlib
32 import os 32 import os
33 import re 33 import re
34 34
35 from webkitpy.common.system import path
36 35
37 36
38 class MockFileSystem(object): 37 class MockFileSystem(object):
39 sep = '/' 38 sep = '/'
40 pardir = '..' 39 pardir = '..'
41 40
42 def __init__(self, files=None, dirs=None, cwd='/'): 41 def __init__(self, files=None, dirs=None, cwd='/'):
43 """Initializes a "mock" filesystem that can be used to completely 42 """Initializes a "mock" filesystem that can be used to completely
44 stub out a filesystem. 43 stub out a filesystem.
45 44
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 return self.data.readline(length) 479 return self.data.readline(length)
481 480
482 def __iter__(self): 481 def __iter__(self):
483 return self.data.__iter__() 482 return self.data.__iter__()
484 483
485 def next(self): 484 def next(self):
486 return self.data.next() 485 return self.data.next()
487 486
488 def seek(self, offset, whence=os.SEEK_SET): 487 def seek(self, offset, whence=os.SEEK_SET):
489 self.data.seek(offset, whence) 488 self.data.seek(offset, whence)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698