simplify pluginmanager, move plugin validation code to plugin, remove unused code
--HG-- branch : trunk
This commit is contained in:
@@ -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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user