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

Unified Diff: tests/scm_unittest.py

Issue 6690034: Add more python 2.5 compatibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Don't force python 2.5 anymore (to be done in a separate change) Created 9 years, 9 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: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index 917e0e3beffc983e2a649a8f74d943efe6193a8a..155d11ae7e5047f6214b2feb0acf57aca54c87c7 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -1,11 +1,15 @@
-#!/usr/bin/python
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+#!/usr/bin/env python
+# Copyright (c) 2011 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.
"""Unit tests for scm.py."""
# pylint: disable=E1101,W0403
+from __future__ import with_statement
+import logging
+import sys
+import unittest
# Fixes include path.
from super_mox import SuperMoxTestBase
@@ -325,7 +329,8 @@ class RealSvnTest(fake_repos.FakeReposTestBase):
if __name__ == '__main__':
- import unittest
+ if '-v' in sys.argv:
+ logging.basicConfig(level=logging.DEBUG)
unittest.main()
# vim: ts=2:sw=2:tw=80:et:
« tests/owners_unittest.py ('K') | « tests/presubmit_unittest.py ('k') | tests/super_mox.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698