diff -r 04b10fa9aa67 Lib/test/regrtest.py --- a/Lib/test/regrtest.py Thu Jan 27 08:34:45 2011 +0100 +++ b/Lib/test/regrtest.py Thu Jan 27 18:47:43 2011 +0100 @@ -315,7 +315,13 @@ 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 to check if it's a relative path, and join it with the + # saved CWD + if os.path.isabs(a): + coverdir = a + else: + coverdir = os.path.join(support.SAVEDCWD, a) elif o in ('-N', '--nocoverdir'): coverdir = None elif o in ('-R', '--huntrleaks'):