Beispiel #1
0
    def test_process_file_group_instantiates_threadpool(self):
        patcher = patch('messor.pick_up.ThreadPoolExecutor')
        self.addCleanup(patcher.stop)
        self.threadpool = patcher.start()

	process_file_group(self.files, self.remote_driver)

	self.threadpool.assert_called_once_with(max_workers=16)
Beispiel #2
0
    def test_process_file_group_waits_for_threads_to_finish(self):
	ret = process_file_group(self.files, self.remote_driver)

        self.assertIsInstance(ret, list)
        self.assertNotIsInstance(ret, GeneratorType)
Beispiel #3
0
    def test_process_file_group_processes_all_file_entries(self):
	process_file_group(self.files, self.remote_driver)

        self.assertEqual(5, len(self.process_file.mock_calls))
Beispiel #4
0
    def test_process_file_group_builds_file_index(self):
	process_file_group(self.files, self.remote_driver)

	self.build_file_index.assert_called_once_with(self.files, self.remote_driver)