From 79f9ad9083808953cf7ffb01e592c4e77b3336ab Mon Sep 17 00:00:00 2001 From: YunLiu <55491388+KumoLiu@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:56:23 +0800 Subject: [PATCH] Fix unittest (#8161) Fixes #8160 ### Description A few sentences describing the changes proposed in this pull request. ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> --- monai/networks/utils.py | 2 +- tests/test_bundle_download.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monai/networks/utils.py b/monai/networks/utils.py index d0150b4e5b..295a055390 100644 --- a/monai/networks/utils.py +++ b/monai/networks/utils.py @@ -697,7 +697,7 @@ def convert_to_onnx( torch.onnx.export( mode_to_export, onnx_inputs, - f=f, + f=f, # type: ignore[arg-type] input_names=input_names, output_names=output_names, dynamic_axes=dynamic_axes, diff --git a/tests/test_bundle_download.py b/tests/test_bundle_download.py index 02a9f40846..399c61b117 100644 --- a/tests/test_bundle_download.py +++ b/tests/test_bundle_download.py @@ -250,7 +250,7 @@ def test_download_monaihosting(self, mock_get_versions): mock_logger.warning.assert_called_once() @skip_if_quick - @patch("monai.bundle.scripts.get_versions", return_value={"version": "1.2"}) + @patch("monai.bundle.scripts.get_versions", return_value={"version": "1.3"}) def test_download_ngc(self, mock_get_versions): """Test checking MONAI version from a metadata file.""" with patch("monai.bundle.scripts.logger") as mock_logger: