forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin_basic.py
51 lines (35 loc) · 943 Bytes
/
plugin_basic.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright (c) 2005 Divmod, Inc.
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
# Don't change the docstring, it's part of the tests
"""
I'm a test drop-in. The plugin system's unit tests use me. No one
else should.
"""
from zope.interface import provider
from twisted.plugin import IPlugin
from twisted.test.test_plugin import ITestPlugin, ITestPlugin2
@provider(ITestPlugin, IPlugin)
class TestPlugin:
"""
A plugin used solely for testing purposes.
"""
def test1():
pass
test1 = staticmethod(test1)
@provider(ITestPlugin2, IPlugin)
class AnotherTestPlugin:
"""
Another plugin used solely for testing purposes.
"""
def test():
pass
test = staticmethod(test)
@provider(ITestPlugin2, IPlugin)
class ThirdTestPlugin:
"""
Another plugin used solely for testing purposes.
"""
def test():
pass
test = staticmethod(test)