From d2d5bbd9187fa4e2ad2faa31787b0f2ccb0f8e49 Mon Sep 17 00:00:00 2001 From: hpk Date: Wed, 10 Sep 2008 00:08:21 +0200 Subject: [PATCH] [svn r58030] check for different output according to cpython version --HG-- branch : trunk --- py/code/testing/test_excinfo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/py/code/testing/test_excinfo.py b/py/code/testing/test_excinfo.py index aaaca1c1b..5d82e60ab 100644 --- a/py/code/testing/test_excinfo.py +++ b/py/code/testing/test_excinfo.py @@ -215,8 +215,11 @@ def test_excinfo_no_sourcecode(): except ValueError: excinfo = py.code.ExceptionInfo() s = str(excinfo.traceback[-1]) - assert s == " File '':1 in ?\n ???\n" - + if py.std.sys.version_info < (2,5): + assert s == " File '':1 in ?\n ???\n" + else: + assert s == " File '':1 in \n ???\n" + def test_entrysource_Queue_example(): import Queue try: