def test_plugin_info_moduleMtime(self): panoptes_plugin_info = PanoptesPluginInfo("plugin_name", "path/to/plugin") panoptes_plugin_info.path = self.my_dir self.assertEqual(panoptes_plugin_info.moduleMtime, get_module_mtime(self.my_dir)) panoptes_plugin_info.path = 0 with self.assertRaises(PanoptesPluginConfigurationError): panoptes_plugin_info.moduleMtime
def test_plugin_info_moduleMtime(self): panoptes_plugin_info = PanoptesPluginInfo(u"plugin_name", u"path/to/plugin") panoptes_plugin_info.path = self.my_dir self.assertEqual(panoptes_plugin_info.moduleMtime, get_module_mtime(self.my_dir)) with self.assertRaises(Exception): panoptes_plugin_info.path = 0 panoptes_plugin_info.moduleMtime