run-tests: move _hgpath() up so it's not in the middle of the main program.
authorGreg Ward <greg-hg@gerg.ca>
Mon, 20 Apr 2009 21:07:05 -0400
changeset 8092 c49578c5122f
parent 8091 e85cc856d2e1
child 8093 70d8f70264c4
run-tests: move _hgpath() up so it's not in the middle of the main program.
tests/run-tests.py
--- 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