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

Unified Diff: tests/gclient_test.py

Issue 7891061: Fix member lookup to be more stable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Simplify test Created 9 years, 3 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 | « gclient.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_test.py
diff --git a/tests/gclient_test.py b/tests/gclient_test.py
index 0a5da250ff536ad6964bf0c99d70e9ae5bb922ea..86aa893844ee9010e1d32fa502ca0f06cf8f76dc 100755
--- a/tests/gclient_test.py
+++ b/tests/gclient_test.py
@@ -203,6 +203,34 @@ class GclientTest(trial_dir.TestCase):
None, '', True)
self.assertEquals('proto://host/path@revision', d.url)
+ def testStr(self):
+ # Make sure __str__() works fine.
+ # pylint: disable=W0212
+ parser = gclient.Parser()
+ options, _ = parser.parse_args([])
+ obj = gclient.GClient('foo', options)
+ obj.dependencies.append(
+ gclient.Dependency(obj, 'foo', 'url', None, None, None, 'DEPS', True))
+ obj.dependencies.append(
+ gclient.Dependency(obj, 'bar', 'url', None, None, None, 'DEPS', True))
+ obj.dependencies[0].dependencies.append(
+ gclient.Dependency(
+ obj.dependencies[0], 'foo/dir1', 'url', None, None, None, 'DEPS',
+ True))
+ obj.dependencies[0].dependencies.append(
+ gclient.Dependency(
+ obj.dependencies[0], 'foo/dir2',
+ gclient.GClientKeywords.FromImpl('bar'), None, None, None, 'DEPS',
+ True))
+ obj.dependencies[0].dependencies.append(
+ gclient.Dependency(
+ obj.dependencies[0], 'foo/dir3',
+ gclient.GClientKeywords.FileImpl('url'), None, None, None, 'DEPS',
+ True))
+ obj.dependencies[0]._file_list.append('foo')
+ self.assertEquals(434, len(str(obj)), '%d\n%s' % (len(str(obj)), str(obj)))
+
+
if __name__ == '__main__':
logging.basicConfig(
level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698