Using --tb=short has propably always crashed (with a failing test).
Attached is a file demonstrating a few issues with pypys applevel
testing framework, of which some might be
'won't fix'
Elmo
from pypy.conftest import gettestobjspace
class BaseAppTestInheritance:
def setup_class(cls):
pass
def test_foo(self):
pass
class AppTest(BaseAppTestInheritance):
def setup_class(cls):
BaseAppTestInheritance.setup_class(cls)
#Demonstrates the workaround I had to use instead of the former way:
class BaseAppTestWorkaround:
def setup_class(cls):
self._setup_class(cls)
@staticmethod
def _setup_class(cls):
pass
def test_foo(self):
pass
class AppTestWorkaround(BaseAppTestWorkaround):
def setup_class(cls):
BaseAppTestWorkaround._setup_class(cls)
#Should this work? I don't specifically need this 'cause I found a better way...
class AppTestFoo:
def setup_class(cls):
cls.space = gettestobjspace()
cls.w_func = cls.space.appexec([cls.space.wrap(cls)], """(cls):
def f():
print cls.var
return f
""")
cls.w_var='foo'
def test_foo(self):
self.func()
class AppTestBar:
def setup_class(cls):
cls.space = gettestobjspace()
cls.w_func = cls.space.appexec((), """():
import py.test
def f():
py.test.skip()
return f
""")
def test_foo(self):
self.func()
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev