Increase expectation on output of gclient for help and unknown command.

Also adds msg to assertions to print current size of data written to stdout.

Review URL: https://chromiumcodereview.appspot.com/16058007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202863 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
tyoshino@chromium.org 13 years ago
parent 4a3c17eab4
commit 15ece796fe

@ -170,14 +170,16 @@ class GClientSmoke(GClientSmokeBase):
"""testHelp: make sure no new command was added.""" """testHelp: make sure no new command was added."""
result = self.gclient(['help']) result = self.gclient(['help'])
# Roughly, not too short, not too long. # Roughly, not too short, not too long.
self.assertTrue(1000 < len(result[0]) and len(result[0]) < 2000) self.assertTrue(1000 < len(result[0]) and len(result[0]) < 2100,
'Too much written to stdout: %d bytes' % len(result[0]))
self.assertEquals(0, len(result[1])) self.assertEquals(0, len(result[1]))
self.assertEquals(0, result[2]) self.assertEquals(0, result[2])
def testUnknown(self): def testUnknown(self):
result = self.gclient(['foo']) result = self.gclient(['foo'])
# Roughly, not too short, not too long. # Roughly, not too short, not too long.
self.assertTrue(1000 < len(result[0]) and len(result[0]) < 2000) self.assertTrue(1000 < len(result[0]) and len(result[0]) < 2100,
'Too much written to stdout: %d bytes' % len(result[0]))
self.assertEquals(0, len(result[1])) self.assertEquals(0, len(result[1]))
self.assertEquals(0, result[2]) self.assertEquals(0, result[2])

Loading…
Cancel
Save