@@ -328,6 +328,43 @@ def test_create_reasoning_engine(
328
328
retry = _TEST_RETRY ,
329
329
)
330
330
331
+ @pytest .mark .usefixtures ("caplog" )
332
+ def test_create_reasoning_engine_warn_resource_name (
333
+ self ,
334
+ caplog ,
335
+ create_reasoning_engine_mock ,
336
+ cloud_storage_create_bucket_mock ,
337
+ tarfile_open_mock ,
338
+ cloudpickle_dump_mock ,
339
+ get_reasoning_engine_mock ,
340
+ ):
341
+ reasoning_engines .ReasoningEngine .create (
342
+ self .test_app ,
343
+ reasoning_engine_name = _TEST_REASONING_ENGINE_RESOURCE_NAME ,
344
+ display_name = _TEST_REASONING_ENGINE_DISPLAY_NAME ,
345
+ requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
346
+ )
347
+ assert "does not support user-defined resource IDs" in caplog .text
348
+
349
+ @pytest .mark .usefixtures ("caplog" )
350
+ def test_create_reasoning_engine_warn_sys_version (
351
+ self ,
352
+ caplog ,
353
+ create_reasoning_engine_mock ,
354
+ cloud_storage_create_bucket_mock ,
355
+ tarfile_open_mock ,
356
+ cloudpickle_dump_mock ,
357
+ get_reasoning_engine_mock ,
358
+ ):
359
+ sys_version = f"{ sys .version_info .major } .{ sys .version_info .minor } "
360
+ reasoning_engines .ReasoningEngine .create (
361
+ self .test_app ,
362
+ sys_version = "3.10" if sys_version != "3.10" else "3.11" ,
363
+ display_name = _TEST_REASONING_ENGINE_DISPLAY_NAME ,
364
+ requirements = _TEST_REASONING_ENGINE_REQUIREMENTS ,
365
+ )
366
+ assert f"is inconsistent with { sys .version_info = } " in caplog .text
367
+
331
368
def test_create_reasoning_engine_requirements_from_file (
332
369
self ,
333
370
create_reasoning_engine_mock ,
0 commit comments