File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,15 @@ def run_evals(
181
181
"""
182
182
Run evals for a list of tests.
183
183
"""
184
+ # For coverage to work with multiprocessing
185
+ # https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
186
+ try :
187
+ from pytest_cov .embed import cleanup_on_sigterm # fmt: skip
188
+ except ImportError :
189
+ pass
190
+ else :
191
+ cleanup_on_sigterm ()
192
+
184
193
model_results = defaultdict (list )
185
194
with ProcessPoolExecutor (parallel ) as executor :
186
195
model_futures_to_test = {
Original file line number Diff line number Diff line change 8
8
@pytest .mark .slow
9
9
def test_eval_cli ():
10
10
runner = CliRunner ()
11
+ test_set = ["hello" ]
11
12
result = runner .invoke (
12
13
main ,
13
14
[
14
15
"--model" ,
15
16
"openai/gpt-4o" ,
17
+ * test_set ,
16
18
],
17
19
)
18
20
assert result
You can’t perform that action at this time.
0 commit comments