[py-dev] Bug with py.test when object repr contains "\n"
Jan Balster
jan at balster.info
Wed Jun 1 16:46:20 CEST 2005
Pierre Barbier de Reuille wrote:
Hi Pierre,
here is a quick patch to fix your problem.
The patch doesn't break any py-lib test but perhaps some tests in pypy.
I won't commit the patch to the trunk unless I am sure it won't break
anything. Perhaps Holger will do ;-)
Jan
Patch:
--- exprinfo.py (revision 12973)
+++ exprinfo.py (working copy)
@@ -61,11 +61,13 @@
stackcnt[-1] += 1
stackcnt.append(0)
result.append(' +' + ' '*(len(stack)-1) + s + line[1:])
- else:
+ elif line.startswith('}'):
assert line.startswith('}')
stack.pop()
stackcnt.pop()
result[stack[-1]] += line[1:]
+ else:
+ result.append(' '* len(result[-1])+ line)
assert len(stack) == 1
return '\n'.join(result)
More information about the py-dev
mailing list