summaryrefslogtreecommitdiff
path: root/coverage/python.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-01-07 20:07:04 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-01-07 20:07:04 -0500
commit702e63cc4ae2bd0475bf8100fc7b0bbe14713b4a (patch)
treefd4e636268a112815ce6f1e3ed44454e20ce5e0a /coverage/python.py
parent7650c3d69c945fc204b60267bf88bcd77b52f13b (diff)
parent3e2625dd17674339073c6afc4da6ba3b99932e4c (diff)
downloadpython-coveragepy-702e63cc4ae2bd0475bf8100fc7b0bbe14713b4a.tar.gz
Branch analysis is now done with AST instead of bytecode
Diffstat (limited to 'coverage/python.py')
-rw-r--r--coverage/python.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/python.py b/coverage/python.py
index 5e56382..07d2347 100644
--- a/coverage/python.py
+++ b/coverage/python.py
@@ -50,6 +50,8 @@ def get_python_source(filename):
# Couldn't find source.
raise NoSource("No source for code: '%s'." % filename)
+ # Replace \f because of http://bugs.python.org/issue19035
+ source = source.replace(b'\f', b' ')
source = source.decode(source_encoding(source), "replace")
# Python code should always end with a line with a newline.