Skip to content

Commit d91cba3

Browse files
speedstorm1copybara-github
authored andcommitted
chore: update tests to be compatible with Python 3.14
PiperOrigin-RevId: 825273830
1 parent 4618729 commit d91cba3

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

tests/unit/aiplatform/test_prediction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3287,7 +3287,8 @@ def test_health(self, model_server_env_mock, importlib_import_module_mock_twice)
32873287

32883288
assert response.status_code == 200
32893289

3290-
def test_predict(self, model_server_env_mock, importlib_import_module_mock_twice):
3290+
@pytest.mark.asyncio
3291+
async def test_predict(self, model_server_env_mock, importlib_import_module_mock_twice):
32913292
model_server = CprModelServer()
32923293
client = TestClient(model_server.app)
32933294

tests/unit/vertex_rag/test_rag_data.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,10 @@ def create_transformation_config(
419419
def rag_corpus_eq(returned_corpus, expected_corpus):
420420
assert returned_corpus.name == expected_corpus.name
421421
assert returned_corpus.display_name == expected_corpus.display_name
422-
assert returned_corpus.backend_config.__eq__(expected_corpus.backend_config)
423-
assert returned_corpus.vertex_ai_search_config.__eq__(
424-
expected_corpus.vertex_ai_search_config
422+
assert returned_corpus.backend_config == expected_corpus.backend_config
423+
assert (
424+
returned_corpus.vertex_ai_search_config
425+
== expected_corpus.vertex_ai_search_config
425426
)
426427

427428

@@ -464,8 +465,8 @@ def import_files_request_eq(returned_request, expected_request):
464465

465466
def rag_engine_config_eq(returned_config, expected_config):
466467
assert returned_config.name == expected_config.name
467-
assert returned_config.rag_managed_db_config.__eq__(
468-
expected_config.rag_managed_db_config
468+
assert (
469+
returned_config.rag_managed_db_config == expected_config.rag_managed_db_config
469470
)
470471

471472

tests/unit/vertex_rag/test_rag_data_preview.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,12 +674,13 @@ def create_transformation_config(
674674
def rag_corpus_eq(returned_corpus, expected_corpus):
675675
assert returned_corpus.name == expected_corpus.name
676676
assert returned_corpus.display_name == expected_corpus.display_name
677-
assert returned_corpus.vector_db.__eq__(expected_corpus.vector_db)
678-
assert returned_corpus.backend_config.__eq__(expected_corpus.backend_config)
679-
assert returned_corpus.vertex_ai_search_config.__eq__(
680-
expected_corpus.vertex_ai_search_config
677+
assert returned_corpus.vector_db == expected_corpus.vector_db
678+
assert returned_corpus.backend_config == expected_corpus.backend_config
679+
assert (
680+
returned_corpus.vertex_ai_search_config
681+
== expected_corpus.vertex_ai_search_config
681682
)
682-
assert returned_corpus.corpus_type_config.__eq__(expected_corpus.corpus_type_config)
683+
assert returned_corpus.corpus_type_config == expected_corpus.corpus_type_config
683684

684685

685686
def rag_file_eq(returned_file, expected_file):
@@ -729,8 +730,8 @@ def import_files_request_eq(returned_request, expected_request):
729730

730731
def rag_engine_config_eq(returned_config, expected_config):
731732
assert returned_config.name == expected_config.name
732-
assert returned_config.rag_managed_db_config.__eq__(
733-
expected_config.rag_managed_db_config
733+
assert (
734+
returned_config.rag_managed_db_config == expected_config.rag_managed_db_config
734735
)
735736

736737

0 commit comments

Comments
 (0)