# HG changeset patch # User Patrick Mezard # Date 1206208869 -3600 # Node ID 6aaf5b1d8f157dffd37e6c5e7e679728d45345da # Parent f8feaa6653196569ffebc57bf82672590edb0c4c coverage: deal with symlinked input paths (MacOSX issue) /tmp is symlinked in MacOSX therefore test scripts as well as python modules are installed in a symlinked location. coverage.py uses abspath() to normalize its inputs which fails if these are referencing real paths. Use realpath() instead. diff -r f8feaa665319 -r 6aaf5b1d8f15 tests/coverage.py --- a/tests/coverage.py Sat Mar 22 18:01:46 2008 +0100 +++ b/tests/coverage.py Sat Mar 22 19:01:09 2008 +0100 @@ -412,6 +412,9 @@ else: omit = [] + omit = [os.path.normcase(os.path.abspath(os.path.realpath(p))) + for p in omit] + if settings.get('report'): self.report(args, show_missing, ignore_errors, omit_prefixes=omit) if settings.get('annotate'): @@ -537,7 +540,7 @@ if os.path.exists(g): f = g break - cf = os.path.normcase(os.path.abspath(f)) + cf = os.path.normcase(os.path.abspath(os.path.realpath(f))) self.canonical_filename_cache[filename] = cf return self.canonical_filename_cache[filename]