def setup(self): m = multiscanner.load_module('test_1', [multiscanner.MODULEDIR]) global_module_interface = multiscanner._GlobalModuleInterface() self.result = multiscanner._run_module('test_1', m, self.filelist, self.threadDict, global_module_interface) global_module_interface._cleanup()
def test_results_1(self): self.result = multiscanner._run_module('test_2', self.m, self.files, self.threadDict, self.global_module_interface) assert self.result == ([('a', True), ('b', 'b'), ('C:\\c', True), ('/d/d', '/d/d')], { 'Type': 'Test', 'Name': 'test_2', 'Include': True })
def test_replacepath_linux(self): self.m.DEFAULTCONF['replacement path'] = '/tmp' self.result = multiscanner._run_module('test_2', self.m, self.files, self.threadDict, self.global_module_interface) assert self.result == ([('a', True), ('b', '/tmp/b'), ('C:\\c', True), ('/d/d', '/tmp/d')], { 'Name': 'test_2', 'Include': True, 'Type': 'Test' })
def test_replacepath_windows(self): self.m.DEFAULTCONF['replacement path'] = 'X:\\' self.result = multiscanner._run_module('test_2', self.m, self.files, self.threadDict, self.global_module_interface) assert self.result == ([('a', True), ('b', 'X:\\b'), ('C:\\c', True), ('/d/d', 'X:\\d')], { 'Type': 'Test', 'Name': 'test_2', 'Include': True }) # noqa: E501
def test_no_requires(self): del self.threadDict['test_1'] self.result = multiscanner._run_module('test_2', self.m, self.filelist, self.threadDict, self.global_module_interface) assert self.result is None
def test_replacepath_windows(self): self.m.DEFAULTCONF['replacement path'] = 'X:\\' self.result = multiscanner._run_module( 'test_2', self.m, self.files, self.threadDict, self.global_module_interface) assert self.result == ([('a', True), ('b', 'X:\\b'), ('C:\\c', True), ('/d/d', 'X:\\d')], {'Type': 'Test', 'Name': 'test_2', 'Include': True}) # noqa: E501
def test_results_1(self): self.result = multiscanner._run_module( 'test_2', self.m, self.files, self.threadDict, self.global_module_interface) assert self.result == ([('a', True), ('b', 'b'), ('C:\\c', True), ('/d/d', '/d/d')], {'Type': 'Test', 'Name': 'test_2', 'Include': True}) # noqa: E501
def test_no_requires(self): del self.threadDict['test_1'] self.result = multiscanner._run_module( 'test_2', self.m, self.filelist, self.threadDict, self.global_module_interface) assert self.result is None
def setup(self): m = utils.load_module('test_1', [multiscanner.MODULESDIR]) global_module_interface = multiscanner._GlobalModuleInterface() self.result = multiscanner._run_module('test_1', m, self.filelist, self.threadDict, global_module_interface) global_module_interface._cleanup()