#11030: make --coverdir work for relative directories again.

This commit is contained in:
R David Murray 2011-03-24 14:35:30 -04:00
parent 6712a3e14f
commit 03504fc2fb
1 changed files with 3 additions and 1 deletions

View File

@ -315,7 +315,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
elif o in ('-T', '--coverage'): elif o in ('-T', '--coverage'):
trace = True trace = True
elif o in ('-D', '--coverdir'): 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'): elif o in ('-N', '--nocoverdir'):
coverdir = None coverdir = None
elif o in ('-R', '--huntrleaks'): elif o in ('-R', '--huntrleaks'):