Make the trace module ignore modules whose names start with "<" and

end with ">", i.e. follow convention.
This commit is contained in:
Brett Cannon 2012-04-10 21:05:53 -04:00
parent ec766a6179
commit 9fe92d1de5
2 changed files with 5 additions and 2 deletions

View File

@ -244,8 +244,7 @@ class CoverageResults:
"""Return True if the filename does not refer to a file """Return True if the filename does not refer to a file
we want to have reported. we want to have reported.
""" """
return (filename == "<string>" or return filename.startswith('<') and filename.endswith('>')
filename.startswith("<doctest "))
def update(self, other): def update(self, other):
"""Merge in the data from another CoverageResults""" """Merge in the data from another CoverageResults"""

View File

@ -19,6 +19,10 @@ Core and Builtins
Library Library
------- -------
- trace.CoverageResults.is_ignored_filename() now ignores any name that starts
with "<" and ends with ">" instead of special-casing "<string>" and
"<doctest ".
- Issue #12537: The mailbox module no longer depends on knowledge of internal - Issue #12537: The mailbox module no longer depends on knowledge of internal
implementation details of the email package Message object. implementation details of the email package Message object.