diff options
author | Brett Cannon <brett@python.org> | 2012-04-11 01:05:53 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-11 01:05:53 (GMT) |
commit | 9fe92d1de52fcb63527b2cffa5dbfbc2ae719508 (patch) | |
tree | c6ca67b49a46525b4c5957fa404438bdff073f00 | |
parent | ec766a61795a21015ba5b95c106f1c2b089b3ff0 (diff) | |
download | cpython-9fe92d1de52fcb63527b2cffa5dbfbc2ae719508.zip cpython-9fe92d1de52fcb63527b2cffa5dbfbc2ae719508.tar.gz cpython-9fe92d1de52fcb63527b2cffa5dbfbc2ae719508.tar.bz2 |
Make the trace module ignore modules whose names start with "<" and
end with ">", i.e. follow convention.
-rw-r--r-- | Lib/trace.py | 3 | ||||
-rw-r--r-- | Misc/NEWS | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/trace.py b/Lib/trace.py index 850369b..885824a 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -244,8 +244,7 @@ class CoverageResults: """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""" @@ -19,6 +19,10 @@ Core and Builtins 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. |