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')