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

Unified Diff: tracing/third_party/tvcm/tvcm/fake_fs_unittest.py

Issue 1376953005: Move tracing/third_party/tvcm -> third_party/py_vulcanize. (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Created 5 years, 2 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
Index: tracing/third_party/tvcm/tvcm/fake_fs_unittest.py
diff --git a/tracing/third_party/tvcm/tvcm/fake_fs_unittest.py b/tracing/third_party/tvcm/tvcm/fake_fs_unittest.py
deleted file mode 100644
index 0daa469cd14c2cccd529646129ffd5418d46ba83..0000000000000000000000000000000000000000
--- a/tracing/third_party/tvcm/tvcm/fake_fs_unittest.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-
-from tvcm import fake_fs
-
-
-class FakeFSUnittest(unittest.TestCase):
-
- def testBasic(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/blah/x', 'foobar')
- with fs:
- assert os.path.exists(os.path.normpath('/blah/x'))
- self.assertEquals(
- 'foobar',
- open(os.path.normpath('/blah/x'), 'r').read())
-
- def testWithableOpen(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/blah/x', 'foobar')
- with fs:
- with open(os.path.normpath('/blah/x'), 'r') as f:
- self.assertEquals('foobar', f.read())
-
- def testWalk(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/x/w2/w3/z3.txt', '')
- fs.AddFile('/x/w/z.txt', '')
- fs.AddFile('/x/y.txt', '')
- fs.AddFile('/a.txt', 'foobar')
- with fs:
- gen = os.walk(os.path.normpath('/'))
- r = gen.next()
- self.assertEquals((os.path.normpath('/'), ['x'], ['a.txt']), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x'), ['w', 'w2'], ['y.txt']), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x/w'), [], ['z.txt']), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x/w2'), ['w3'], []), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x/w2/w3'), [], ['z3.txt']), r)
-
- self.assertRaises(StopIteration, gen.next)

Powered by Google App Engine
This is Rietveld 408576698