[pypy-commit] pypy default: add a monkeypatch to py.code.Source.deindent to our conftest to avoid cpu burn
RonnyPfannschmidt
noreply at buildbot.pypy.org
Mon Aug 27 18:30:11 CEST 2012
Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch:
Changeset: r56886:463589f1428d
Date: 2012-08-27 18:29 +0200
http://bitbucket.org/pypy/pypy/changeset/463589f1428d/
Log: add a monkeypatch to py.code.Source.deindent to our conftest to
avoid cpu burn
diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -19,6 +19,15 @@
#
option = None
+
+def braindead_deindent(self):
+ """monkeypatch that wont end up doing stupid in the python tokenizer"""
+ text = '\n'.join(self.lines)
+ short = py.std.textwrap.dedent(text)
+ return short.splitlines()
+
+py.code.Source.deindent = braindead_deindent
+
def pytest_report_header():
return "pytest-%s from %s" %(pytest.__version__, pytest.__file__)
More information about the pypy-commit
mailing list