import os

root_dirpath = os.path.join(Gimp.directory(), 'batcher')
plugin_dirpath = os.path.join(root_dirpath, 'batcher')

procedure = Gimp.get_pdb().lookup_procedure('plug-in-run-tests')
config = procedure.create_config()
config.set_property('run-mode', Gimp.RunMode.NONINTERACTIVE)
config.set_property('directory', Gio.file_new_for_path(plugin_dirpath))
config.set_property('prefix', 'test_')
config.set_property('modules', ['src', 'dev'])
config.set_property('ignored-modules', ['src.tests.tests_requiring_gimp'])
config.set_property('output-stream', os.path.join(plugin_dirpath, 'test_output.log'))
config.set_property('verbose', False)
procedure.run(config)

procedure = Gimp.get_pdb().lookup_procedure('plug-in-run-tests')
config = procedure.create_config()
config.set_property('run-mode', Gimp.RunMode.NONINTERACTIVE)
config.set_property('directory', Gio.file_new_for_path(plugin_dirpath))
config.set_property('prefix', 'test_')
config.set_property('modules', ['src.tests.tests_requiring_gimp'])
config.set_property('ignored-modules', [])
config.set_property('output-stream', os.path.join(plugin_dirpath, 'test_output_contents.log'))
config.set_property('verbose', False)
procedure.run(config)


import importlib
import os
import sys
sys.path.append(os.path.join(Gimp.directory(), 'batcher', 'batcher'))
from src.tests.setting import _test_setting_gui
_test_setting_gui.test_settings_and_gui()
