33
44import pytest
55from humanloop .error import HumanloopRuntimeError
6- from tests .custom .integration .conftest import TestIdentifiers
6+ from tests .custom .integration .conftest import ResourceIdentifiers
77from tests .custom .types import GetHumanloopClientFn
88
99
1010def test_eval_run_works_on_online_files (
1111 get_humanloop_client : GetHumanloopClientFn ,
12- output_not_null_evaluator : TestIdentifiers ,
13- eval_dataset : TestIdentifiers ,
14- eval_prompt : TestIdentifiers ,
12+ output_not_null_evaluator : ResourceIdentifiers ,
13+ eval_dataset : ResourceIdentifiers ,
14+ eval_prompt : ResourceIdentifiers ,
1515) -> None :
1616 humanloop_client = get_humanloop_client ()
1717 humanloop_client .evaluations .run ( # type: ignore [attr-defined]
@@ -39,9 +39,9 @@ def test_eval_run_works_on_online_files(
3939
4040def test_eval_run_version_id (
4141 get_humanloop_client : GetHumanloopClientFn ,
42- output_not_null_evaluator : TestIdentifiers ,
43- eval_dataset : TestIdentifiers ,
44- eval_prompt : TestIdentifiers ,
42+ output_not_null_evaluator : ResourceIdentifiers ,
43+ eval_dataset : ResourceIdentifiers ,
44+ eval_prompt : ResourceIdentifiers ,
4545 test_prompt_config : dict [str , Any ],
4646) -> None :
4747 humanloop_client = get_humanloop_client ()
@@ -88,9 +88,9 @@ def test_eval_run_version_id(
8888
8989def test_eval_run_environment (
9090 get_humanloop_client : GetHumanloopClientFn ,
91- output_not_null_evaluator : TestIdentifiers ,
92- eval_dataset : TestIdentifiers ,
93- eval_prompt : TestIdentifiers ,
91+ output_not_null_evaluator : ResourceIdentifiers ,
92+ eval_dataset : ResourceIdentifiers ,
93+ eval_prompt : ResourceIdentifiers ,
9494 test_prompt_config : dict [str , Any ],
9595 id_for_staging_environment : str ,
9696) -> None :
@@ -141,9 +141,9 @@ def test_eval_run_environment(
141141@pytest .mark .parametrize ("version_lookup" , ["version_id" , "environment" ])
142142def test_eval_run_version_lookup_fails_with_path (
143143 get_humanloop_client : GetHumanloopClientFn ,
144- eval_prompt : TestIdentifiers ,
145- eval_dataset : TestIdentifiers ,
146- output_not_null_evaluator : TestIdentifiers ,
144+ eval_prompt : ResourceIdentifiers ,
145+ eval_dataset : ResourceIdentifiers ,
146+ output_not_null_evaluator : ResourceIdentifiers ,
147147 version_lookup : str ,
148148):
149149 # GIVEN an eval run where we try to evaluate a non-default version
@@ -172,9 +172,9 @@ def test_eval_run_version_lookup_fails_with_path(
172172
173173def test_eval_run_with_version_upsert (
174174 get_humanloop_client : GetHumanloopClientFn ,
175- eval_prompt : TestIdentifiers ,
176- eval_dataset : TestIdentifiers ,
177- output_not_null_evaluator : TestIdentifiers ,
175+ eval_prompt : ResourceIdentifiers ,
176+ eval_dataset : ResourceIdentifiers ,
177+ output_not_null_evaluator : ResourceIdentifiers ,
178178 test_prompt_config : dict [str , Any ],
179179):
180180 humanloop_client = get_humanloop_client ()
@@ -210,8 +210,8 @@ def test_eval_run_with_version_upsert(
210210
211211def test_flow_eval_does_not_work_without_callable (
212212 get_humanloop_client : GetHumanloopClientFn ,
213- eval_dataset : TestIdentifiers ,
214- output_not_null_evaluator : TestIdentifiers ,
213+ eval_dataset : ResourceIdentifiers ,
214+ output_not_null_evaluator : ResourceIdentifiers ,
215215):
216216 with pytest .raises (HumanloopRuntimeError ) as e :
217217 humanloop_client = get_humanloop_client ()
@@ -241,8 +241,8 @@ def test_flow_eval_does_not_work_without_callable(
241241
242242def test_flow_eval_works_with_callable (
243243 get_humanloop_client : GetHumanloopClientFn ,
244- eval_dataset : TestIdentifiers ,
245- output_not_null_evaluator : TestIdentifiers ,
244+ eval_dataset : ResourceIdentifiers ,
245+ output_not_null_evaluator : ResourceIdentifiers ,
246246 sdk_test_dir : str ,
247247):
248248 humanloop_client = get_humanloop_client ()
@@ -290,8 +290,8 @@ def test_flow_eval_works_with_callable(
290290
291291def test_cannot_evaluate_agent_with_callable (
292292 get_humanloop_client : GetHumanloopClientFn ,
293- eval_dataset : TestIdentifiers ,
294- output_not_null_evaluator : TestIdentifiers ,
293+ eval_dataset : ResourceIdentifiers ,
294+ output_not_null_evaluator : ResourceIdentifiers ,
295295):
296296 with pytest .raises (ValueError ) as e :
297297 humanloop_client = get_humanloop_client ()
@@ -316,8 +316,8 @@ def test_cannot_evaluate_agent_with_callable(
316316
317317def test_flow_eval_resolves_to_default_with_callable (
318318 get_humanloop_client : GetHumanloopClientFn ,
319- output_not_null_evaluator : TestIdentifiers ,
320- eval_dataset : TestIdentifiers ,
319+ output_not_null_evaluator : ResourceIdentifiers ,
320+ eval_dataset : ResourceIdentifiers ,
321321 sdk_test_dir : str ,
322322) -> None :
323323 humanloop_client = get_humanloop_client ()
@@ -361,8 +361,8 @@ def test_flow_eval_resolves_to_default_with_callable(
361361@pytest .mark .skip (reason = "Skip until agents are in prod" )
362362def test_agent_eval_works_upserting (
363363 get_humanloop_client : GetHumanloopClientFn ,
364- eval_dataset : TestIdentifiers ,
365- output_not_null_evaluator : TestIdentifiers ,
364+ eval_dataset : ResourceIdentifiers ,
365+ output_not_null_evaluator : ResourceIdentifiers ,
366366 sdk_test_dir : str ,
367367):
368368 humanloop_client = get_humanloop_client ()
0 commit comments