Coverage for src/qollib/processing/testing.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.4.0, created at 2024-01-02 08:34 +0000

1#!/usr/bin/env python3 

2# -*- coding: utf-8 -*- 

3""" 

4Mocks for testing multi processing functionality. 

5 

6@author: hoelken 

7""" 

8 

9 

10def sequentially(func, args, workers=None): 

11 """ 

12 Method mimics the `simultaneous` or `threaded` methods, but calls everything in sequence. 

13 :param func: function to call 

14 :param args: arguments to call the function with 

15 :param workers: Ignored 

16 :return: result of the call. 

17 """ 

18 return list(func(arg) for arg in args)