예제 #1
0
 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()
예제 #2
0
 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
                             })
예제 #3
0
 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'
                             })
예제 #4
0
 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
예제 #5
0
 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
예제 #6
0
 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
예제 #7
0
 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
예제 #8
0
 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
예제 #9
0
 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()