GeezerVison is showing github.com — chore: fix unit test assertions · juni2003/python-aiplatform@d205601
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: setup.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 197 | 197 | full_extra_require | 198 | 198 | + profiler_extra_require | 199 | 199 | + tokenization_testing_extra_require | | 200 | + + vizier_extra_require | 200 | 201 | + [ | 201 | 202 | # aiohttp is required for async rest tests (need google-auth[aiohttp], | 202 | 203 | # but can't specify extras in constraints files) | |
Collapse file Copy file name to clipboardExpand all lines: testing/constraints-3.10.txt +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,4 +14,5 @@ pytest-xdist==3.3.1 # Pinned to unbreak unit tests | 14 | 14 | ray==2.4.0 # Pinned until 2.9.3 is verified for Ray tests | 15 | 15 | ipython==8.22.2 # Pinned to unbreak TypeAliasType import error | 16 | 16 | scikit-learn!=1.4.1.post1 # Pin to unbreak test_sklearn (b/332610038) | 17 | | -requests==2.31.0 # Pinned to unbreak http+docker error (b/342669351) | | 17 | +requests==2.31.0 # Pinned to unbreak http+docker error (b/342669351) | | 18 | +google-vizier==0.1.21 |
Collapse file Copy file name to clipboardExpand all lines: testing/constraints-3.11.txt +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,3 +11,4 @@ packaging==24.1 # Increased to unbreak canonicalize_version error (b/377774673) | 11 | 11 | pytest-xdist==3.3.1 # Pinned to unbreak unit tests | 12 | 12 | ray==2.5.0 # Pinned until 2.9.3 is verified for Ray tests | 13 | 13 | ipython==8.22.2 # Pinned to unbreak TypeAliasType import error | | 14 | +google-vizier==0.1.21 |
Collapse file Copy file name to clipboardExpand all lines: testing/constraints-3.8.txt +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,3 +12,4 @@ packaging==24.1 # Increased to unbreak canonicalize_version error (b/377774673) | 12 | 12 | grpcio-testing==1.34.0 | 13 | 13 | pytest-xdist==3.3.1 # Pinned to unbreak unit tests | 14 | 14 | ray==2.4.0 # Pinned until 2.9.3 is verified for Ray tests | | 15 | +google-vizier==0.1.21 |
Collapse file Copy file name to clipboardExpand all lines: testing/constraints-3.9.txt +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,3 +11,4 @@ packaging==24.1 # Increased to unbreak canonicalize_version error (b/377774673) | 11 | 11 | grpcio-testing==1.34.0 | 12 | 12 | pytest-xdist==3.3.1 # Pinned to unbreak unit tests | 13 | 13 | ray==2.4.0 # Pinned until 2.9.3 is verified for Ray tests | | 14 | +google-vizier==0.1.21 |
Collapse file Copy file name to clipboardExpand all lines: tests/unit/aiplatform/test_endpoints.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -3922,7 +3922,7 @@ def test_psa_delete_with_force(self, sdk_undeploy_mock, delete_endpoint_mock, sy | 3922 | 3922 | test_endpoint.wait() | 3923 | 3923 |
| 3924 | 3924 | # undeploy() should not be called unless force is set to True | 3925 | | - sdk_undeploy_mock.called_once_with(deployed_model_id=_TEST_ID, sync=sync) | | 3925 | + sdk_undeploy_mock.assert_not_called() | 3926 | 3926 |
| 3927 | 3927 | delete_endpoint_mock.assert_called_once_with(name=_TEST_ENDPOINT_NAME) | 3928 | 3928 |
| |
Collapse file Copy file name to clipboardExpand all lines: tests/unit/aiplatform/test_utils.py +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -559,15 +559,19 @@ def test_validate_transformations_with_column_transformations(self): | 559 | 559 | class TestGcsUtils: | 560 | 560 | def test_upload_to_gcs(self, json_file, mock_storage_blob_upload_from_filename): | 561 | 561 | gcs_utils.upload_to_gcs(json_file, f"gs://{GCS_BUCKET}/{GCS_PREFIX}") | 562 | | - assert mock_storage_blob_upload_from_filename.called_once_with(json_file) | | 562 | + mock_storage_blob_upload_from_filename.assert_called_once_with( | | 563 | + filename=json_file | | 564 | + ) | 563 | 565 |
| 564 | 566 | def test_stage_local_data_in_gcs( | 565 | 567 | self, json_file, mock_datetime, mock_storage_blob_upload_from_filename | 566 | 568 | ): | 567 | 569 | timestamp = EXPECTED_TIME.isoformat(sep="-", timespec="milliseconds") | 568 | 570 | staging_gcs_dir = f"gs://{GCS_BUCKET}/{GCS_PREFIX}" | 569 | 571 | data_uri = gcs_utils.stage_local_data_in_gcs(json_file, staging_gcs_dir) | 570 | | - assert mock_storage_blob_upload_from_filename.called_once_with(json_file) | | 572 | + mock_storage_blob_upload_from_filename.assert_called_once_with( | | 573 | + filename=json_file | | 574 | + ) | 571 | 575 | assert ( | 572 | 576 | data_uri | 573 | 577 | == f"{staging_gcs_dir}/vertex_ai_auto_staging/{timestamp}/test.json" | |
|