[pypy-commit] pypy kill-someobject: merged upstream
alex_gaynor
noreply at buildbot.pypy.org
Fri Oct 12 16:01:35 CEST 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: kill-someobject
Changeset: r58043:6aca8686fd6f
Date: 2012-10-12 07:01 -0700
http://bitbucket.org/pypy/pypy/changeset/6aca8686fd6f/
Log: merged upstream
diff --git a/pypy/translator/c/test/test_genc.py b/pypy/translator/c/test/test_genc.py
--- a/pypy/translator/c/test/test_genc.py
+++ b/pypy/translator/c/test/test_genc.py
@@ -106,6 +106,13 @@
t.compile_c()
ll_res = graphof(t.context, fn).getreturnvar().concretetype
+ def output(stdout):
+ for line in stdout.splitlines(False):
+ if len(repr(line)) == len(line) + 2: # no escaped char
+ print line
+ else:
+ print 'REPR:', repr(line)
+
def f(*args, **kwds):
expected_extra_mallocs = kwds.pop('expected_extra_mallocs', 0)
expected_exception_name = kwds.pop('expected_exception_name', None)
@@ -118,19 +125,20 @@
" ".join([llrepr_in(arg) for arg in args]),
expect_crash=(expected_exception_name is not None))
#
- for line in stdout.splitlines(False):
- if len(repr(line)) == len(line) + 2: # no escaped char
- print line
- else:
- print 'REPR:', repr(line)
- #
if expected_exception_name is not None:
stdout, stderr = stdout
+ print '--- stdout ---'
+ output(stdout)
+ print '--- stderr ---'
+ output(stderr)
+ print '--------------'
stderr, lastline, empty = stderr.rsplit('\n', 2)
assert empty == ''
assert lastline == ('Fatal RPython error: ' +
expected_exception_name)
return None
+
+ output(stdout)
stdout, lastline, empty = stdout.rsplit('\n', 2)
assert empty == ''
assert lastline.startswith('MALLOC COUNTERS: ')
diff --git a/pypy/translator/test/test_exceptiontransform.py b/pypy/translator/test/test_exceptiontransform.py
--- a/pypy/translator/test/test_exceptiontransform.py
+++ b/pypy/translator/test/test_exceptiontransform.py
@@ -64,6 +64,8 @@
assert f() == 1
def test_passthrough(self):
+ if self.type_system == 'ootype':
+ py.test.skip("XXX")
def one(x):
if x:
raise ValueError()
@@ -73,7 +75,7 @@
one(1)
t, g = self.transform_func(foo, [])
f = self.compile(foo, [])
- py.test.raises(ValueError, f)
+ f(expected_exception_name='ValueError')
def test_catches(self):
def one(x):
@@ -142,6 +144,8 @@
assert result == 2
def test_raises(self):
+ if self.type_system == 'ootype':
+ py.test.skip("XXX")
def foo(x):
if x:
raise ValueError()
@@ -149,7 +153,7 @@
assert len(list(g.iterblocks())) == 3
f = self.compile(foo, [int])
f(0)
- py.test.raises(ValueError, f, 1)
+ f(1, expected_exception_name='ValueError')
def test_no_multiple_transform(self):
More information about the pypy-commit
mailing list