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

Unified Diff: tests/__init__.py

Issue 122040: Refactor the unit tests. (Closed)
Patch Set: even more cleanup Created 11 years, 6 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 | « no previous file | tests/abandon.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/__init__.py
diff --git a/tests/__init__.py b/tests/__init__.py
index b956655dcef59e451a67466f830b13bb4527c8be..fe852d5e9308645482cae911e725fd8ac039c1bc 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -4,35 +4,3 @@
# found in the LICENSE file.
"""Unit tests for depot_tools."""
-
-mox = None
-
-def OnTestsLoad():
- import os
- import sys
- old_path = sys.path
- global mox
- try:
- directory, _file = os.path.split(__file__)
- sys.path.append(os.path.abspath(os.path.join(directory, 'pymox')))
- sys.path.append(os.path.abspath(os.path.join(directory, '..')))
- try:
- import mox as Mox
- mox = Mox
- except ImportError:
- print "Trying to automatically checkout pymox."
- import subprocess
- subprocess.call(['svn', 'co', 'http://pymox.googlecode.com/svn/trunk',
- os.path.join(directory, 'pymox')],
- shell=True)
- try:
- import mox as Mox
- mox = Mox
- except ImportError:
- print >> sys.stderr, ("\nError, failed to load pymox\n")
- raise
- finally:
- # Restore the path
- sys.path = old_path
-
-OnTestsLoad()
« no previous file with comments | « no previous file | tests/abandon.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698