summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
Diffstat (limited to 'coverage')
-rw-r--r--coverage/cmdline.py2
-rw-r--r--coverage/collector.py14
-rw-r--r--coverage/config.py2
-rw-r--r--coverage/control.py42
-rw-r--r--coverage/ctracer/tracer.c2
-rw-r--r--coverage/data.py12
-rw-r--r--coverage/files.py10
-rw-r--r--coverage/html.py2
-rw-r--r--coverage/report.py2
-rw-r--r--coverage/xmlreport.py2
10 files changed, 45 insertions, 45 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index b2ffdf75..413fbba7 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -629,7 +629,7 @@ def unshell_list(s):
if env.WINDOWS:
# When running coverage.py as coverage.exe, some of the behavior
# of the shell is emulated: wildcards are expanded into a list of
- # filenames. So you have to single-quote patterns on the command
+ # file names. So you have to single-quote patterns on the command
# line, but (not) helpfully, the single quotes are included in the
# argument, so we have to strip them off here.
s = s.strip("'")
diff --git a/coverage/collector.py b/coverage/collector.py
index de111169..60eb918e 100644
--- a/coverage/collector.py
+++ b/coverage/collector.py
@@ -62,10 +62,10 @@ class Collector(object):
):
"""Create a collector.
- `should_trace` is a function, taking a filename, and returning a
+ `should_trace` is a function, taking a file name, and returning a
`coverage.FileDisposition object`.
- `check_include` is a function taking a filename and a frame. It returns
+ `check_include` is a function taking a file name and a frame. It returns
a boolean: True if the file should be traced, False if not.
If `timid` is true, then a slower simpler trace function will be
@@ -146,21 +146,21 @@ class Collector(object):
def reset(self):
"""Clear collected data, and prepare to collect more."""
- # A dictionary mapping filenames to dicts with line number keys (if not
- # branch coverage), or mapping filenames to dicts with line number
+ # A dictionary mapping file names to dicts with line number keys (if not
+ # branch coverage), or mapping file names to dicts with line number
# pairs as keys (if branch coverage).
self.data = {}
- # A dictionary mapping filenames to file tracer plugin names that will
+ # A dictionary mapping file names to file tracer plugin names that will
# handle them.
self.file_tracers = {}
- # The .should_trace_cache attribute is a cache from filenames to
+ # The .should_trace_cache attribute is a cache from file names to
# coverage.FileDisposition objects, or None. When a file is first
# considered for tracing, a FileDisposition is obtained from
# Coverage.should_trace. Its .trace attribute indicates whether the
# file should be traced or not. If it should be, a plugin with dynamic
- # filenames can decide not to trace it based on the dynamic filename
+ # file names can decide not to trace it based on the dynamic file name
# being excluded by the inclusion rules, in which case the
# FileDisposition will be replaced by None in the cache.
if env.PYPY:
diff --git a/coverage/config.py b/coverage/config.py
index 83eea519..458d4903 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -20,7 +20,7 @@ class HandyConfigParser(configparser.RawConfigParser):
self.section_prefix = section_prefix
def read(self, filename):
- """Read a filename as UTF-8 configuration data."""
+ """Read a file name as UTF-8 configuration data."""
kwargs = {}
if sys.version_info >= (3, 2):
kwargs['encoding'] = "utf-8"
diff --git a/coverage/control.py b/coverage/control.py
index 050b6fbd..16b09c84 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -99,7 +99,7 @@ class Coverage(object):
in the trees indicated by the file paths or package names will be
measured.
- `include` and `omit` are lists of filename patterns. Files that match
+ `include` and `omit` are lists of file name patterns. Files that match
`include` will be measured, files that match `omit` will not. Each
will also accept a single string argument.
@@ -294,7 +294,7 @@ class Coverage(object):
self.pylib_dirs.add(self._canonical_dir(m))
if _structseq and not hasattr(_structseq, '__file__'):
# PyPy 2.4 has no __file__ in the builtin modules, but the code
- # objects still have the filenames. So dig into one to find
+ # objects still have the file names. So dig into one to find
# the path to exclude.
structseq_new = _structseq.structseq_new
try:
@@ -361,7 +361,7 @@ class Coverage(object):
def _source_for_file(self, filename):
"""Return the source file for `filename`.
- Given a filename being traced, return the best guess as to the source
+ Given a file name being traced, return the best guess as to the source
file to attribute it to.
"""
@@ -387,18 +387,18 @@ class Coverage(object):
# Jython is easy to guess.
return filename[:-9] + ".py"
- # No idea, just use the filename as-is.
+ # No idea, just use the file name as-is.
return filename
def _name_for_module(self, module_globals, filename):
- """Get the name of the module for a set of globals and filename.
+ """Get the name of the module for a set of globals and file name.
For configurability's sake, we allow __main__ modules to be matched by
their importable name.
If loaded via runpy (aka -m), we can usually recover the "original"
full dotted module name, otherwise, we resort to interpreting the
- filename to get the module's name. In the case that the module name
+ file name to get the module's name. In the case that the module name
can't be determined, None is returned.
"""
@@ -444,8 +444,8 @@ class Coverage(object):
disp.reason = reason
return disp
- # Compiled Python files have two filenames: frame.f_code.co_filename is
- # the filename at the time the .pyc was compiled. The second name is
+ # Compiled Python files have two file names: frame.f_code.co_filename is
+ # the file name at the time the .pyc was compiled. The second name is
# __file__, which is where the .pyc was actually loaded from. Since
# .pyc files can be moved after compilation (for example, by being
# installed), we look for __file__ in the frame and prefer it to the
@@ -458,22 +458,22 @@ class Coverage(object):
if orig != os.path.basename(filename):
# Files shouldn't be renamed when moved. This happens when
# exec'ing code. If it seems like something is wrong with
- # the frame's filename, then just use the original.
+ # the frame's file name, then just use the original.
filename = original_filename
if not filename:
# Empty string is pretty useless.
- return nope(disp, "empty string isn't a filename")
+ return nope(disp, "empty string isn't a file name")
if filename.startswith('memory:'):
return nope(disp, "memory isn't traceable")
if filename.startswith('<'):
# Lots of non-file execution is represented with artificial
- # filenames like "<string>", "<doctest readme.txt[0]>", or
+ # file names like "<string>", "<doctest readme.txt[0]>", or
# "<exec_function>". Don't ever trace these executions, since we
# can't do anything with the data later anyway.
- return nope(disp, "not a real filename")
+ return nope(disp, "not a real file name")
# Jython reports the .class file to the tracer, use the source file.
if filename.endswith("$py.class"):
@@ -530,7 +530,7 @@ class Coverage(object):
return disp
def _check_include_omit_etc_internal(self, filename, frame):
- """Check a filename against the include, omit, etc, rules.
+ """Check a file name against the include, omit, etc, rules.
Returns a string or None. String means, don't trace, and is the reason
why. None means no reason found to not trace.
@@ -583,7 +583,7 @@ class Coverage(object):
return disp
def _check_include_omit_etc(self, filename, frame):
- """Check a filename against the include/omit/etc, rules, verbosely.
+ """Check a file name against the include/omit/etc, rules, verbosely.
Returns a boolean: True if the file should be traced, False if not.
@@ -856,10 +856,10 @@ class Coverage(object):
def analysis2(self, morf):
"""Analyze a module.
- `morf` is a module or a filename. It will be analyzed to determine
+ `morf` is a module or a file name. It will be analyzed to determine
its coverage statistics. The return value is a 5-tuple:
- * The filename for the module.
+ * The file name for the module.
* A list of line numbers of executable statements.
* A list of line numbers of excluded statements.
* A list of line numbers of statements not run (missing from
@@ -893,7 +893,7 @@ class Coverage(object):
return Analysis(self.data, it)
def _get_file_reporter(self, morf):
- """Get a FileReporter for a module or filename."""
+ """Get a FileReporter for a module or file name."""
plugin = None
file_reporter = "python"
@@ -918,12 +918,12 @@ class Coverage(object):
return file_reporter
def _get_file_reporters(self, morfs=None):
- """Get a list of FileReporters for a list of modules or filenames.
+ """Get a list of FileReporters for a list of modules or file names.
- For each module or filename in `morfs`, find a FileReporter. Return
+ For each module or file name in `morfs`, find a FileReporter. Return
the list of FileReporters.
- If `morfs` is a single module or filename, this returns a list of one
+ If `morfs` is a single module or file name, this returns a list of one
FileReporter. If `morfs` is empty or None, then the list of all files
measured is used to find the FileReporters.
@@ -952,7 +952,7 @@ class Coverage(object):
Each module in `morfs` is listed, with counts of statements, executed
statements, missing statements, and a list of lines missed.
- `include` is a list of filename patterns. Files that match will be
+ `include` is a list of file name patterns. Files that match will be
included in the report. Files matching `omit` will not be included in
the report.
diff --git a/coverage/ctracer/tracer.c b/coverage/ctracer/tracer.c
index 933f3cfd..3d77bd54 100644
--- a/coverage/ctracer/tracer.c
+++ b/coverage/ctracer/tracer.c
@@ -971,7 +971,7 @@ CTracer_members[] = {
PyDoc_STR("The raw dictionary of trace data.") },
{ "file_tracers", T_OBJECT, offsetof(CTracer, file_tracers), 0,
- PyDoc_STR("Mapping from filename to plugin name.") },
+ PyDoc_STR("Mapping from file name to plugin name.") },
{ "should_trace_cache", T_OBJECT, offsetof(CTracer, should_trace_cache), 0,
PyDoc_STR("Dictionary caching should_trace results.") },
diff --git a/coverage/data.py b/coverage/data.py
index 89c5b36e..974764b0 100644
--- a/coverage/data.py
+++ b/coverage/data.py
@@ -84,16 +84,16 @@ class CoverageData(object):
# The data file format is JSON, with these keys:
#
- # * lines: a dict mapping filenames to lists of line numbers
+ # * lines: a dict mapping file names to lists of line numbers
# executed::
#
# { "file1": [17,23,45], "file2": [1,2,3], ... }
#
- # * arcs: a dict mapping filenames to lists of line number pairs::
+ # * arcs: a dict mapping file names to lists of line number pairs::
#
# { "file1": [[17,23], [17,25], [25,26]], ... }
#
- # * file_tracers: a dict mapping filenames to plugin names::
+ # * file_tracers: a dict mapping file names to plugin names::
#
# { "file1": "django.coverage", ... }
#
@@ -235,11 +235,11 @@ class CoverageData(object):
def line_counts(self, fullpath=False):
"""Return a dict summarizing the line coverage data.
- Keys are based on the filenames, and values are the number of executed
+ Keys are based on the file names, and values are the number of executed
lines. If `fullpath` is true, then the keys are the full pathnames of
the files, otherwise they are the basenames of the files.
- Returns a dict mapping filenames to counts of lines.
+ Returns a dict mapping file names to counts of lines.
"""
summ = {}
@@ -610,7 +610,7 @@ class CoverageDataFiles(object):
`basename` is the name of the file to use for storing data.
"""
- # Construct the filename that will be used for data storage.
+ # Construct the file name that will be used for data storage.
self.filename = os.path.abspath(basename or ".coverage")
def erase(self, parallel=False):
diff --git a/coverage/files.py b/coverage/files.py
index 1b6f6281..2b8727d4 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -38,7 +38,7 @@ def relative_directory():
def relative_filename(filename):
"""Return the relative form of `filename`.
- The filename will be relative to the current directory when the
+ The file name will be relative to the current directory when the
`set_relative_directory` was called.
"""
@@ -48,7 +48,7 @@ def relative_filename(filename):
return filename
def canonical_filename(filename):
- """Return a canonical filename for `filename`.
+ """Return a canonical file name for `filename`.
An absolute path with no redundant components and normalized case.
@@ -68,7 +68,7 @@ def canonical_filename(filename):
def flat_rootname(filename):
- """A base for a flat filename to correspond to this file.
+ """A base for a flat file name to correspond to this file.
Useful for writing files about the code where you want all the files in
the same directory, but need to differentiate same-named files from
@@ -210,7 +210,7 @@ class ModuleMatcher(object):
class FnmatchMatcher(object):
- """A matcher for files by filename pattern."""
+ """A matcher for files by file name pattern."""
def __init__(self, pats):
self.pats = pats[:]
# fnmatch is platform-specific. On Windows, it does the Windows thing
@@ -233,7 +233,7 @@ class FnmatchMatcher(object):
return self.pats
def match(self, fpath):
- """Does `fpath` match one of our filename patterns?"""
+ """Does `fpath` match one of our file name patterns?"""
return self.re.match(fpath) is not None
diff --git a/coverage/html.py b/coverage/html.py
index c0dfe80e..8c306c62 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -109,7 +109,7 @@ class HtmlReporter(Reporter):
def report(self, morfs):
"""Generate an HTML report for `morfs`.
- `morfs` is a list of modules or filenames.
+ `morfs` is a list of modules or file names.
"""
assert self.config.html_dir, "must give a directory for html reporting"
diff --git a/coverage/report.py b/coverage/report.py
index 1be4155d..f153aa5a 100644
--- a/coverage/report.py
+++ b/coverage/report.py
@@ -32,7 +32,7 @@ class Reporter(object):
def find_file_reporters(self, morfs):
"""Find the FileReporters we'll report on.
- `morfs` is a list of modules or filenames.
+ `morfs` is a list of modules or file names.
"""
self.file_reporters = self.coverage._get_file_reporters(morfs)
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py
index d547559c..998b9599 100644
--- a/coverage/xmlreport.py
+++ b/coverage/xmlreport.py
@@ -40,7 +40,7 @@ class XmlReporter(Reporter):
def report(self, morfs, outfile=None):
"""Generate a Cobertura-compatible XML report for `morfs`.
- `morfs` is a list of modules or filenames.
+ `morfs` is a list of modules or file names.
`outfile` is a file object to write the XML to.