summaryrefslogtreecommitdiff
path: root/tests/plugins/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/python.py')
-rw-r--r--tests/plugins/python.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/plugins/python.py b/tests/plugins/python.py
new file mode 100644
index 0000000..1a3dd97
--- /dev/null
+++ b/tests/plugins/python.py
@@ -0,0 +1,27 @@
+
+from chrysacase import ChrysalideTestCase
+from pychrysalide.plugins import PythonPlugin
+
+
+class TestPlugin(ChrysalideTestCase):
+ """TestCase for GPythonPlugin."""
+
+
+ def testPluginInfoImplementations(self):
+ """Retrieve plugin basic information provided by __init__()."""
+
+ class MyPlugin(PythonPlugin):
+ """Custom description."""
+
+ def __init__(self):
+ super().__init__(__file__, '0.0.1', 'custom-url')
+
+ my = MyPlugin()
+
+ self.assertEqual(my.name, 'MyPlugin')
+ self.assertEqual(my.desc, 'Custom description.')
+ self.assertEqual(my.version, '0.0.1')
+ self.assertEqual(my.url, 'custom-url')
+
+ self.assertEqual(my.filename, __file__)
+ self.assertEqual(my.modname, 'python')