summaryrefslogtreecommitdiff
path: root/tests/plugins/python.py
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2025-01-12 14:23:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2025-01-12 14:23:01 (GMT)
commitbaa854bfcc969022a00617b58a661e37f345cab5 (patch)
tree093d3ace4c2e1ad8fa37ce5e08723f768fffbada /tests/plugins/python.py
parent0fdba5bd3e2c9ed913619990dbda7925867e46c5 (diff)
Rewrite the plugin system.
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')