avoid prepend to register api as it's redundant wrt to hooks

--HG--
branch : plugin_no_pytest
This commit is contained in:
holger krekel
2015-04-22 13:31:46 +02:00
parent 1ef49ac5ab
commit 7049ebe4e2
3 changed files with 5 additions and 18 deletions

View File

@@ -32,18 +32,6 @@ class TestPluginManager:
pm.unregister(a1)
assert not pm.isregistered(a1)
def test_pm_ordering(self, pm):
class A: pass
a1, a2 = A(), A()
pm.register(a1)
pm.register(a2, "hello")
l = pm.getplugins()
assert l.index(a1) < l.index(a2)
a3 = A()
pm.register(a3, prepend=True)
l = pm.getplugins()
assert l.index(a3) == 0
def test_register_mismatch_method(self):
pm = get_plugin_manager()
class hello: