瀏覽代碼

travis compatibility

Bastien Sevajol 7 年之前
父節點
當前提交
17a1aae7f3
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      tests/test_processing.py

+ 7 - 7
tests/test_processing.py 查看文件

@@ -12,8 +12,8 @@ class MyFakeClass(object):
12 12
 
13 13
 
14 14
 class TestProcessing(BaseTest):
15
-    @staticmethod
16
-    def _make_job_with_scalar(
15
+    def make_job_with_scalar(
16
+            self,
17 17
             data_chunk: list,
18 18
             process_number: int,
19 19
             process_count: int,
@@ -22,8 +22,8 @@ class TestProcessing(BaseTest):
22 22
         result = sum(data_chunk)
23 23
         return current_pid, result
24 24
 
25
-    @staticmethod
26
-    def _make_job_with_object(
25
+    def make_job_with_object(
26
+            self,
27 27
             data_chunk: list,
28 28
             process_number: int,
29 29
             process_count: int,
@@ -46,7 +46,7 @@ class TestProcessing(BaseTest):
46 46
 
47 47
         results = process_manager.chunk_and_execute_jobs(
48 48
             data,
49
-            job_maker=self._make_job_with_scalar,
49
+            job_maker=self.make_job_with_scalar,
50 50
         )
51 51
 
52 52
         for process_id, result in results:
@@ -70,7 +70,7 @@ class TestProcessing(BaseTest):
70 70
         data = list(range(100))
71 71
         results = process_manager.chunk_and_execute_jobs(
72 72
             data,
73
-            job_maker=self._make_job_with_scalar,
73
+            job_maker=self.make_job_with_scalar,
74 74
         )
75 75
         process_id, final_result = results[0]
76 76
 
@@ -91,7 +91,7 @@ class TestProcessing(BaseTest):
91 91
 
92 92
         results = process_manager.chunk_and_execute_jobs(
93 93
             data,
94
-            job_maker=self._make_job_with_object,
94
+            job_maker=self.make_job_with_object,
95 95
         )
96 96
 
97 97
         for process_id, result_object in results: