diff options
author | R David Murray <rdmurray@bitdance.com> | 2011-03-24 18:35:30 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2011-03-24 18:35:30 (GMT) |
commit | 03504fc2fbb7aab41560e761c8ed8e24b4ec6ebe (patch) | |
tree | 04e0ae7fa4b141d4851739c1022499f88f4285db /Lib/test/regrtest.py | |
parent | 6712a3e14f04923c3de2e916996874ed2f96f1d1 (diff) | |
download | cpython-03504fc2fbb7aab41560e761c8ed8e24b4ec6ebe.zip cpython-03504fc2fbb7aab41560e761c8ed8e24b4ec6ebe.tar.gz cpython-03504fc2fbb7aab41560e761c8ed8e24b4ec6ebe.tar.bz2 |
#11030: make --coverdir work for relative directories again.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 63268e5..18c86f7 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -315,7 +315,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, elif o in ('-T', '--coverage'): trace = True elif o in ('-D', '--coverdir'): - coverdir = os.path.join(os.getcwd(), a) + # CWD is replaced with a temporary dir before calling main(), so we + # need join it with the saved CWD so it goes where the user expects. + coverdir = os.path.join(support.SAVEDCWD, a) elif o in ('-N', '--nocoverdir'): coverdir = None elif o in ('-R', '--huntrleaks'): |