@@ -47,10 +47,10 @@ def prf_GIL_impact(run_return: RunReturn, run_setup: RunSetup):
47
47
48
48
class TestCasePerf (unittest .TestCase ):
49
49
50
- OUTPUT_PERF_ADR = "../output/test_perf/"
50
+ OUTPUT_ADR = "../output/test_perf/"
51
51
@classmethod
52
52
def setUpClass (cls ):
53
- shutil .rmtree (TestCasePerf .OUTPUT_PERF_ADR , True )
53
+ shutil .rmtree (TestCasePerf .OUTPUT_ADR , True )
54
54
55
55
@classmethod
56
56
def tearDownClass (cls ):
@@ -60,15 +60,15 @@ def test_one_run(self):
60
60
generator = ParallelExecutor (prf_GIL_impact ,
61
61
label = "GIL_impact" ,
62
62
detail_output = True ,
63
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
63
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
64
64
65
65
self .assertTrue (generator .one_run ())
66
66
67
67
def test_one_run_param (self ):
68
68
generator = ParallelExecutor (prf_GIL_impact ,
69
69
label = "GIL_impact" ,
70
70
detail_output = True ,
71
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
71
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
72
72
73
73
setting = {"aa" :10 ,
74
74
"name" : "Adam" }
@@ -79,7 +79,7 @@ def test_init_run(self):
79
79
generator = ParallelExecutor (prf_GIL_impact ,
80
80
label = "GIL_impact" ,
81
81
detail_output = True ,
82
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
82
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
83
83
84
84
setting = {"aa" :10 ,
85
85
"name" : "Adam" }
@@ -91,7 +91,7 @@ def test_testrun_exception(self):
91
91
generator = ParallelExecutor (prf_GIL_impact ,
92
92
label = "GIL_impact" ,
93
93
detail_output = True ,
94
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
94
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
95
95
96
96
setting = {"generate_error" : "yes" }
97
97
@@ -102,15 +102,15 @@ def test_testrun(self):
102
102
generator = ParallelExecutor (prf_GIL_impact ,
103
103
label = "GIL_impact" ,
104
104
detail_output = True ,
105
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
105
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
106
106
107
107
self .assertTrue (generator .test_run (print_output = True ))
108
108
109
109
def test_testrun_setup (self ):
110
110
generator = ParallelExecutor (prf_GIL_impact ,
111
111
label = "GIL_impact" ,
112
112
detail_output = True ,
113
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
113
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
114
114
115
115
setting = {"aa" : 10 ,
116
116
"name" : "Adam" }
@@ -122,7 +122,7 @@ def test_run(self):
122
122
generator = ParallelExecutor (prf_GIL_impact ,
123
123
label = "GIL_impact" ,
124
124
detail_output = True ,
125
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
125
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
126
126
127
127
setup = RunSetup (duration_second = 4 , start_delay = 2 )
128
128
self .assertTrue (generator .run (2 , 2 , setup ))
@@ -131,7 +131,7 @@ def test_run_exeption(self):
131
131
generator = ParallelExecutor (prf_GIL_impact ,
132
132
label = "GIL_impact" ,
133
133
detail_output = True ,
134
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
134
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
135
135
136
136
setting = {"generate_error" : "yes" }
137
137
@@ -143,7 +143,7 @@ def test_run_executor(self):
143
143
generator = ParallelExecutor (prf_GIL_impact ,
144
144
label = "GIL_impact" ,
145
145
detail_output = True ,
146
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
146
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
147
147
148
148
setup = RunSetup (duration_second = 4 , start_delay = 2 )
149
149
self .assertTrue (generator .run_executor ([[1 ,1 ], [2 ,2 ]], setup ))
@@ -152,7 +152,7 @@ def test_run_executor_exception(self):
152
152
generator = ParallelExecutor (prf_GIL_impact ,
153
153
label = "GIL_impact" ,
154
154
detail_output = True ,
155
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
155
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
156
156
157
157
setting = {"generate_error" : "yes" }
158
158
@@ -163,7 +163,7 @@ def test_run_bulk_executor(self):
163
163
generator = ParallelExecutor (prf_GIL_impact ,
164
164
label = "GIL_impact" ,
165
165
detail_output = True ,
166
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
166
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
167
167
168
168
setup = RunSetup (duration_second = 1 , start_delay = 0 )
169
169
self .assertTrue (generator .run_bulk_executor (bulk_list = [[1 ,2 ], [1 ,10 ]],
@@ -174,7 +174,7 @@ def test_run_bulk_executor_exception(self):
174
174
generator = ParallelExecutor (prf_GIL_impact ,
175
175
label = "GIL_impact" ,
176
176
detail_output = True ,
177
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
177
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
178
178
179
179
setting = {"generate_error" : "yes" }
180
180
@@ -187,7 +187,7 @@ def test_run_bulk_executor_helpers(self):
187
187
generator = ParallelExecutor (prf_GIL_impact ,
188
188
label = "GIL_impact" ,
189
189
detail_output = True ,
190
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
190
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
191
191
192
192
setup = RunSetup (duration_second = 0 , start_delay = 0 )
193
193
self .assertTrue (generator .run_bulk_executor (bulk_list = BundleHelper .ROW_1_COL_10_100 ,
@@ -198,7 +198,7 @@ def test_run_bulk_executor_grow(self):
198
198
generator = ParallelExecutor (prf_GIL_impact ,
199
199
label = "GIL_impact" ,
200
200
detail_output = True ,
201
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ))
201
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ))
202
202
203
203
setup = RunSetup (duration_second = 1 , start_delay = 0 )
204
204
self .assertTrue (generator .run_bulk_executor (bulk_list = [[1 ,2 ]],
@@ -213,7 +213,7 @@ def test_run_bulk_executor_initcall(self):
213
213
generator = ParallelExecutor (prf_GIL_impact ,
214
214
label = "GIL_impact" ,
215
215
detail_output = True ,
216
- output_file = path .join (self .OUTPUT_PERF_ADR , "perf_gil_impact_test.txt" ),
216
+ output_file = path .join (self .OUTPUT_ADR , "perf_gil_impact_test.txt" ),
217
217
init_call = InitCallSetting .all ())
218
218
219
219
setup = RunSetup (duration_second = 1 , start_delay = 0 )
0 commit comments