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

Unified Diff: tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_glob_test.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_glob_test.py
diff --git a/tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_glob_test.py b/tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_glob_test.py
deleted file mode 100755
index b08f982068130e7611628007023340a67f607243..0000000000000000000000000000000000000000
--- a/tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_glob_test.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#! /usr/bin/env python
-#
-# Copyright 2009 Google Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Test for fake_filesystem_glob."""
-
-import doctest
-import sys
-if sys.version_info < (2, 7):
- import unittest2 as unittest
-else:
- import unittest
-
-import fake_filesystem
-import fake_filesystem_glob
-
-
-class FakeGlobUnitTest(unittest.TestCase):
-
- def setUp(self):
- self.filesystem = fake_filesystem.FakeFilesystem(path_separator='/')
- self.glob = fake_filesystem_glob.FakeGlobModule(self.filesystem)
- directory = './xyzzy'
- self.filesystem.CreateDirectory(directory)
- self.filesystem.CreateDirectory('%s/subdir' % directory)
- self.filesystem.CreateDirectory('%s/subdir2' % directory)
- self.filesystem.CreateFile('%s/subfile' % directory)
- self.filesystem.CreateFile('[Temp]')
-
- def testGlobEmpty(self):
- self.assertEqual(self.glob.glob(''), [])
-
- def testGlobStar(self):
- self.assertEqual(['/xyzzy/subdir', '/xyzzy/subdir2', '/xyzzy/subfile'],
- self.glob.glob('/xyzzy/*'))
-
- def testGlobExact(self):
- self.assertEqual(['/xyzzy'], self.glob.glob('/xyzzy'))
- self.assertEqual(['/xyzzy/subfile'], self.glob.glob('/xyzzy/subfile'))
-
- def testGlobQuestion(self):
- self.assertEqual(['/xyzzy/subdir', '/xyzzy/subdir2', '/xyzzy/subfile'],
- self.glob.glob('/x?zz?/*'))
-
- def testGlobNoMagic(self):
- self.assertEqual(['/xyzzy'], self.glob.glob('/xyzzy'))
- self.assertEqual(['/xyzzy/subdir'], self.glob.glob('/xyzzy/subdir'))
-
- def testNonExistentPath(self):
- self.assertEqual([], self.glob.glob('nonexistent'))
-
- def testDocTest(self):
- self.assertFalse(doctest.testmod(fake_filesystem_glob)[0])
-
- def testMagicDir(self):
- self.assertEqual(['/[Temp]'], self.glob.glob('/*emp*'))
-
- def testRootGlob(self):
- self.assertEqual(['[Temp]', 'xyzzy'], self.glob.glob('*'))
-
- def testGlob1(self):
- self.assertEqual(['[Temp]'], self.glob.glob1('/', '*Tem*'))
-
- def testHasMagic(self):
- self.assertTrue(self.glob.has_magic('['))
- self.assertFalse(self.glob.has_magic('a'))
-
-
-if __name__ == '__main__':
- unittest.main()

Powered by Google App Engine
This is Rietveld 408576698