From 6f40441ef854d0ae31f8bebff9f59898afcd282f Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 8 Sep 2010 18:29:26 +0200 Subject: [PATCH] fixing test for python2.4 (thanks ronny) --HG-- branch : trunk --- testing/code/test_excinfo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index a596d8dfe..e158944c9 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -708,4 +708,8 @@ raise ValueError() """) repr = excinfo.getrepr(style='native') assert repr.startswith('Traceback (most recent call last):\n File') - assert repr.endswith('\n assert 0\nAssertionError: assert 0\n') + assert repr.endswith('\nAssertionError: assert 0\n') + assert 'exec (source.compile())' in repr + # python 2.4 fails to get the source line for the assert + if py.std.sys.version_info >= (2, 5): + assert repr.count('assert 0') == 2