Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
88 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t; python-indent: 4 -*- | ||
|
||
|
||
class hello: | ||
|
||
@staticmethod | ||
def print(): | ||
print(f"Some Random Message!") |
40 changes: 40 additions & 0 deletions
40
package/test/pluginsasdirs/pluginsasdirs2/SimplePluginAsDir/SimplePluginAsDir.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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) |
2 changes: 2 additions & 0 deletions
2
package/test/pluginsasdirs/pluginsasdirs2/SimplePluginAsDir/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t; python-indent: 4 -*- | ||
from .SimplePluginAsDir import SimplePluginAsDir |
8 changes: 8 additions & 0 deletions
8
package/test/pluginsasdirs/pluginsasdirs2/SimplePluginAsDir/somerandom.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t; python-indent: 4 -*- | ||
class somerandom: | ||
|
||
def __init__(self, n: int = 42): | ||
self.n = n | ||
|
||
def print(self): | ||
print(f"Answer to everything {self.n}") |
8 changes: 8 additions & 0 deletions
8
package/test/pluginsasdirs/pluginsasdirs2/simplepluginasdir.yapsy-plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Core] | ||
Name = Simple Plugin As Dir | ||
Module = SimplePluginAsDir | ||
|
||
[Documentation] | ||
Author = Ameya Vikram Singh | ||
Version = 0.1 | ||
Description = A simple plugin useful for basic testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters