Code: Alles auswählen
>>> class Foo:
def test_foo ():
return "Testing Foo..."
def test_bar ():
return "Testing Bar..."
def foo ():
return "Foo..."
>>> f = Foo
>>> [eval('f.' + m)() for m in dir(f) if m.startswith('test')]
['Testing Bar...', 'Testing Foo...']