[svn r57440] various fixes for python2.6

--HG--
branch : trunk
This commit is contained in:
hpk
2008-08-18 19:33:31 +02:00
parent fc3721259f
commit a20731b111
5 changed files with 30 additions and 9 deletions

View File

@@ -24,7 +24,12 @@ def test_broken_exception():
assert 'Exception' in safe_repr._repr(BrokenRepr(BrokenReprException("really broken")))
def test_string_exception():
assert 'unknown' in safe_repr._repr(BrokenRepr("string"))
if py.std.sys.version_info < (2,6):
assert 'unknown' in safe_repr._repr(BrokenRepr("string"))
else:
assert 'TypeError' in safe_repr._repr(BrokenRepr("string"))
def test_big_repr():
assert len(safe_repr._repr(range(1000))) <= \