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

Unified Diff: Tools/Scripts/webkitpy/common/system/filesystem_unittest.py

Issue 500453002: Extend functionality of MockFileSystem.move() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 4 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 | « Tools/Scripts/webkitpy/common/system/filesystem_mock.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py b/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
index 736516c1258c411665286aa3b035794230175593..3f7dedbb60313848816a4fc809054b8b53e7045a 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
@@ -124,6 +124,17 @@ class GenericFileSystemTests(object):
self.assertTrue(self.fs.exists('bardir'))
self.assertTrue(self.fs.exists(self.fs.join('bardir', 'baz')))
+ def test_move(self):
+ self.fs.chdir(self.generic_test_dir)
+ self.fs.move('foo.txt', 'bar.txt')
+ self.assertFalse(self.fs.exists('foo.txt'))
+ self.assertTrue(self.fs.exists('bar.txt'))
+ self.fs.move('foodir', 'bardir')
+ self.assertFalse(self.fs.exists('foodir'))
+ self.assertFalse(self.fs.exists(self.fs.join('foodir', 'baz')))
+ self.assertTrue(self.fs.exists('bardir'))
+ self.assertTrue(self.fs.exists(self.fs.join('bardir', 'baz')))
+
class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
def setUp(self):
self.fs = FileSystem()
« no previous file with comments | « Tools/Scripts/webkitpy/common/system/filesystem_mock.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698