run-tests.py and coverage

Patrick Mézard pmezard at gmail.com
Wed Dec 26 15:49:02 CST 2007


Hello,

I am running:

$ python run-tests.py -c test-add
.
# Ran 1 tests, 0 skipped, 0 failed.
Name    Stmts   Exec  Cover
---------------------------


with crew. Am I missing something ?

I don't understand why we are omitting PYTHONDIR when computing coverage. Should we change it ?

# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1198687415 -3600
# Node ID e6cf9962e126a82ebc9d5721caa9589b8bb83b76
# Parent  84a01baea47ff155bc73af1a3aa2b8dcc172f609
run-tests: do not omit PYTHONDIR when computing coverage

That's where mercurial sources are installed.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -202,7 +202,7 @@ def install_hg():
 
 def output_coverage():
     vlog("# Producing coverage report")
-    omit = [BINDIR, TESTDIR, PYTHONDIR]
+    omit = [BINDIR, TESTDIR]
     if not options.cover_stdlib:
         # Exclude as system paths (ignoring empty strings seen on win)
         omit += [x for x in sys.path if x != '']



More information about the Mercurial-devel mailing list