-
Notifications
You must be signed in to change notification settings - Fork 30
/
SimplePluginAsDir.py
40 lines (33 loc) · 933 Bytes
/
SimplePluginAsDir.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
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t; python-indent: 4 -*-
"""
This is certainly the second simplest plugin ever.
"""
from yapsy.IPlugin import IPlugin
from .somerandom import somerandom
class SimplePluginAsDir(IPlugin):
"""
Only trigger the expected test results.
"""
def __init__(self):
"""
init
"""
# initialise parent class
IPlugin.__init__(self)
inst = somerandom(100)
inst.print()
def activate(self):
"""
On activation tell that this has been successful.
"""
# get the automatic procedure from IPlugin
IPlugin.activate(self)
s = somerandom()
s.print()
return
def deactivate(self):
"""
On deactivation check that the 'activated' flag was on then
tell everything's ok to the test procedure.
"""
IPlugin.deactivate(self)