Exemplo n.º 1
0
 def test_replacepath_windows(self):
     self.m.DEFAULTCONF["replacement path"] = "X:\\"
     self.result = multiscanner._runModule("test_2", self.m, self.files, self.threadDict)
     assert self.result == (
         [("a", True), ("b", "X:\\b"), ("C:\\c", True), ("/d/d", "X:\\d")],
         {"Type": "Test", "Name": "test_2", "Include": True},
     )
Exemplo n.º 2
0
 def test_replacepath_linux(self):
     self.m.DEFAULTCONF["replacement path"] = "/tmp"
     self.result = multiscanner._runModule("test_2", self.m, self.files, self.threadDict)
     assert self.result == (
         [("a", True), ("b", "/tmp/b"), ("C:\\c", True), ("/d/d", "/tmp/d")],
         {"Name": "test_2", "Include": True, "Type": "Test"},
     )
Exemplo n.º 3
0
 def test_replacepath_windows(self):
     self.m.DEFAULTCONF['replacement path'] = 'X:\\'
     self.result = multiscanner._runModule('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})
Exemplo n.º 4
0
 def test_results_1(self):
     self.result = multiscanner._runModule('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})
Exemplo n.º 5
0
 def test_no_requires(self):
     del self.threadDict['test_1']
     self.result = multiscanner._runModule('test_2', self.m, self.filelist, self.threadDict, self.global_module_interface)
     assert self.result is None
Exemplo n.º 6
0
 def setup(self):
     m = multiscanner.load_module('test_1', [multiscanner.MODULEDIR])
     global_module_interface = multiscanner._GlobalModuleInterface()
     self.result = multiscanner._runModule('test_1', m, self.filelist, self.threadDict, global_module_interface)
     global_module_interface._cleanup()
Exemplo n.º 7
0
 def test_results_1(self):
     self.result = multiscanner._runModule("test_2", self.m, self.files, self.threadDict)
     assert self.result == (
         [("a", True), ("b", "b"), ("C:\\c", True), ("/d/d", "/d/d")],
         {"Type": "Test", "Name": "test_2", "Include": True},
     )
Exemplo n.º 8
0
 def test_no_requires(self):
     del self.threadDict["test_1"]
     self.result = multiscanner._runModule("test_2", self.m, self.filelist, self.threadDict)
     assert self.result is None
Exemplo n.º 9
0
 def setup(self):
     m = multiscanner._loadModule("test_1", [multiscanner.MODULEDIR])
     self.result = multiscanner._runModule("test_1", m, self.filelist, self.threadDict)