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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 # vim: set fileencoding=utf-8 : 1 # vim: set fileencoding=utf-8 :
2 # Copyright (C) 2010 Google Inc. All rights reserved. 2 # Copyright (C) 2010 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 import os 34 import os
35 import stat 35 import stat
36 import sys 36 import sys
37 import tempfile 37 import tempfile
38 import unittest 38 import unittest
39 39
40 from webkitpy.common.system.filesystem import FileSystem 40 from webkitpy.common.system.filesystem import FileSystem
41 41
42 42
43 class GenericFileSystemTests(object): 43 class GenericFileSystemTests(object):
44
44 """Tests that should pass on either a real or mock filesystem.""" 45 """Tests that should pass on either a real or mock filesystem."""
45 # pylint gets confused about this being a mixin: pylint: disable=E1101 46 # pylint gets confused about this being a mixin: pylint: disable=E1101
46 47
47 def setup_generic_test_dir(self): 48 def setup_generic_test_dir(self):
48 fs = self.fs 49 fs = self.fs
49 self.generic_test_dir = str(self.fs.mkdtemp()) 50 self.generic_test_dir = str(self.fs.mkdtemp())
50 self.orig_cwd = fs.getcwd() 51 self.orig_cwd = fs.getcwd()
51 fs.chdir(self.generic_test_dir) 52 fs.chdir(self.generic_test_dir)
52 fs.write_text_file('foo.txt', 'foo') 53 fs.write_text_file('foo.txt', 'foo')
53 fs.write_text_file('foobar', 'foobar') 54 fs.write_text_file('foobar', 'foobar')
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 fs = FileSystem() 321 fs = FileSystem()
321 self.assertTrue(fs.remove('filename', remove_with_exception)) 322 self.assertTrue(fs.remove('filename', remove_with_exception))
322 self.assertEqual(-1, RealFileSystemTest._remove_failures) 323 self.assertEqual(-1, RealFileSystemTest._remove_failures)
323 324
324 def test_sep(self): 325 def test_sep(self):
325 fs = FileSystem() 326 fs = FileSystem()
326 327
327 self.assertEqual(fs.sep, os.sep) 328 self.assertEqual(fs.sep, os.sep)
328 self.assertEqual(fs.join("foo", "bar"), 329 self.assertEqual(fs.join("foo", "bar"),
329 os.path.join("foo", "bar")) 330 os.path.join("foo", "bar"))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698