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: