[pypy-commit] pypy py3.5: when running tests on windows, the block may be formatted with unix linesep
mattip
pypy.commits at gmail.com
Fri Oct 27 10:33:09 EDT 2017
Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.5
Changeset: r92860:0b92ac004fe5
Date: 2017-10-27 17:30 +0300
http://bitbucket.org/pypy/pypy/changeset/0b92ac004fe5/
Log: when running tests on windows, the block may be formatted with unix
linesep
diff --git a/pypy/tool/pytest/apptest.py b/pypy/tool/pytest/apptest.py
--- a/pypy/tool/pytest/apptest.py
+++ b/pypy/tool/pytest/apptest.py
@@ -90,7 +90,7 @@
import os
try:
if isinstance(func, str):
- if func.startswith((' ', os.linesep)):
+ if func.startswith((' ', os.linesep, '\n')):
# it's probably an indented block, so we prefix if True:
# to avoid SyntaxError
func = "if True:\n" + func
More information about the pypy-commit
mailing list