Skip to content

Commit

Permalink
Fix unittest (#8161)
Browse files Browse the repository at this point in the history
Fixes #8160

### Description

A few sentences describing the changes proposed in this pull request.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [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 <[email protected]>
  • Loading branch information
KumoLiu authored Oct 22, 2024
1 parent a14a9d7 commit 79f9ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion monai/networks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bundle_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 79f9ad9

Please sign in to comment.