Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b427c00

Browse files
committed
The fullmodname() function chopped off the first character if the
module existed in the current directory. Fix this. Backport candidate (I presume).
1 parent 13dbabe commit b427c00

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/trace.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ def fullmodname(path):
180180
if len(dir) > len(longest):
181181
longest = dir
182182

183-
base = path[len(longest) + 1:].replace("/", ".")
183+
if longest:
184+
base = path[len(longest) + 1:]
185+
else:
186+
base = path
187+
base = base.replace("/", ".")
184188
filename, ext = os.path.splitext(base)
185189
return filename
186190

@@ -291,6 +295,9 @@ def write_results(self, show_missing=True, summary=False, coverdir=None):
291295
def write_results_file(self, path, lines, lnotab, lines_hit):
292296
"""Return a coverage results file in path."""
293297

298+
print "path =", `path`
299+
if "/arse" in path:
300+
import pdb; pdb.set_trace()
294301
try:
295302
outfile = open(path, "w")
296303
except IOError, err:

0 commit comments

Comments
 (0)