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

Side by Side Diff: tests/main_test.py

Issue 47623004: chromium-status: tests: handle -vv and -vvv flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-status
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import hashlib 6 import hashlib
7 import json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 # Verify the config now shows True. 352 # Verify the config now shows True.
353 result = self.local_gae.query( 353 result = self.local_gae.query(
354 'import base_page\n' 354 'import base_page\n'
355 'q = base_page.GlobalConfig.all()\n' 355 'q = base_page.GlobalConfig.all()\n'
356 'assert q.count() == 1\n' 356 'assert q.count() == 1\n'
357 'print q.get().public_access\n') 357 'print q.get().public_access\n')
358 self.assertEqual('True\n', result) 358 self.assertEqual('True\n', result)
359 359
360 360
361 if __name__ == '__main__': 361 if __name__ == '__main__':
362 logging.basicConfig(level= 362 logging.basicConfig(level=[logging.WARNING, logging.INFO, logging.DEBUG][
363 [logging.WARNING, logging.INFO, logging.DEBUG][ 363 min(2, sys.argv.count('-v') + (sys.argv.count('-vv') * 2) +
364 min(2, sys.argv.count('-v'))]) 364 (sys.argv.count('-vvv') * 3))])
cmp 2013/11/04 22:27:48 Does optparse natively support this? If it does,
vapier 2013/11/04 22:30:23 shouldn't be hard to rewrite with standard optpars
365 unittest.main() 365 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698