def setUp(self): PluginLoadTest.setUp(self) # load and do instances of plugns plugins = pluginLoad(self.plugins_dir, ConvertBase) self.plugins = plugin_instance(plugins) # subtitles files self.test_files_dir = os.getcwd() + '/test_files/' self.sub_mdvd = self.test_files_dir + 'mdvd.txt' self.sub_mpl2 = self.test_files_dir + 'mpl2.txt' self.sub_srt = self.test_files_dir + 'srt.srt' self.sub_tmpl = self.test_files_dir + 'tmpl.txt' self.not_sub = self.test_files_dir + 'notsub.txt'
# Copyright 2012 Daniel Dereziński <*****@*****.**> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA from gkcore.convert import ConvertBase from gkcore.subsdwn import SubsDownloadBase from gkcore.core import pluginLoad, plugin_instance import os PLUGIN_DIR = [os.path.dirname(__file__)] #katalog bazowy dla pluginów PLUGINS_CONVERT = None PLUGINS_SUBS_DOWN = None _plugins_convert = pluginLoad(PLUGIN_DIR, ConvertBase) PLUGINS_CONVERT = plugin_instance(_plugins_convert) _plugins_subs_down = pluginLoad(PLUGIN_DIR, SubsDownloadBase) PLUGINS_SUBS_DOWN = plugin_instance(_plugins_subs_down)