simplify pluginmanager, move plugin validation code to plugin, remove unused code

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-12-29 10:59:01 +01:00
parent 0361b73d75
commit 8737254a74
5 changed files with 89 additions and 118 deletions

View File

@@ -1,4 +1,5 @@
import py, os
from py.plugin.pytest_helpconfig import collectattr
def test_version(testdir):
assert py.version == py.__version__
@@ -16,3 +17,15 @@ def test_helpconfig(testdir):
"*cmdline*conftest*ENV*",
])
def test_collectattr():
class A:
def pytest_hello(self):
pass
class B(A):
def pytest_world(self):
pass
methods = py.builtin.sorted(collectattr(B))
assert list(methods) == ['pytest_hello', 'pytest_world']
methods = py.builtin.sorted(collectattr(B()))
assert list(methods) == ['pytest_hello', 'pytest_world']