changeset 8092:c49578c5122f

run-tests: move _hgpath() up so it's not in the middle of the main program.
author Greg Ward <greg-hg@gerg.ca>
date Mon, 20 Apr 2009 21:07:05 -0400
parents e85cc856d2e1
children 70d8f70264c4
files tests/run-tests.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Apr 20 21:04:24 2009 -0400
+++ b/tests/run-tests.py	Mon Apr 20 21:07:05 2009 -0400
@@ -274,6 +274,13 @@
         python = '"%s" "%s" -x' % (sys.executable,
                                    os.path.join(TESTDIR,'coverage.py'))
 
+def _hgpath():
+    cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
+    hgpath = os.popen(cmd % python)
+    path = hgpath.read().strip()
+    hgpath.close()
+    return path
+
 def output_coverage():
     vlog("# Producing coverage report")
     omit = [BINDIR, TESTDIR, PYTHONDIR]
@@ -525,13 +532,6 @@
 PYTHONDIR = os.path.join(INST, "lib", "python")
 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
 
-def _hgpath():
-    cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
-    hgpath = os.popen(cmd % python)
-    path = hgpath.read().strip()
-    hgpath.close()
-    return path
-
 expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial')
 hgpkg = None