[Python-checkins] cpython: Make the trace module ignore modules whose names start with "<" and
brett.cannon
python-checkins at python.org
Wed Apr 11 03:06:00 CEST 2012
http://hg.python.org/cpython/rev/8a47d2322df0
changeset: 76232:8a47d2322df0
user: Brett Cannon <brett at python.org>
date: Tue Apr 10 21:05:53 2012 -0400
summary:
Make the trace module ignore modules whose names start with "<" and
end with ">", i.e. follow convention.
files:
Lib/trace.py | 3 +--
Misc/NEWS | 4 ++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Lib/trace.py b/Lib/trace.py
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -244,8 +244,7 @@
"""Return True if the filename does not refer to a file
we want to have reported.
"""
- return (filename == "<string>" or
- filename.startswith("<doctest "))
+ return filename.startswith('<') and filename.endswith('>')
def update(self, other):
"""Merge in the data from another CoverageResults"""
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,6 +19,10 @@
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
implementation details of the email package Message object.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list