1. Gil Shwartz
  2. pypy

Commits

Ronny Pfannschmidt  committed 463589f

add a monkeypatch to py.code.Source.deindent to our conftest to avoid cpu burn

  • Participants
  • Parent commits b282528
  • Branches default

Comments (0)

Files changed (1)

File pypy/conftest.py

View file
  • Ignore whitespace
 #
 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__)