Lines Matching refs:path
72 self._dirs = [] if not dirs else [os.path.normpath(d)
119 def _modname(path):
120 """Return a plausible module name for the path."""
122 base = os.path.basename(path)
123 filename, ext = os.path.splitext(base)
126 def _fullmodname(path):
127 """Return a plausible module name for the path."""
129 # If the file 'path' is part of a package, then the filename isn't
131 # looking in sys.path for the longest matching prefix. We'll
134 comparepath = os.path.normcase(path)
136 for dir in sys.path:
137 dir = os.path.normcase(dir)
143 base = path[len(longest) + 1:]
145 base = path
147 drive, base = os.path.splitdrive(base)
151 filename, ext = os.path.splitext(base)
257 dir = os.path.dirname(os.path.abspath(filename))
261 if not os.path.exists(dir):
272 coverpath = os.path.join(dir, modulename + ".cover")
283 print("lines cov% module (path)")
297 def write_results_file(self, path, lines, lnotab, lines_hit, encoding=None):
298 """Return a coverage results file in path."""
302 outfile = open(path, "w", encoding=encoding)
305 "- skipping" % (path, err)), file=sys.stderr)
413 self.pathtobasename = {} # for memoizing os.path.basename
562 bname = os.path.basename(filename)
575 bname = os.path.basename(filename)
670 s = os.path.expanduser(os.path.expandvars(s))
672 return os.path.normpath(s)
718 sys.path[0] = os.path.dirname(opts.progname)