Skip to content

Commit ad6cda6

Browse files
use assert all close to check errors
Signed-off-by: Yiheng Wang <[email protected]>
1 parent 0a8dfea commit ad6cda6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_load_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_nibabel_reader_gpu(self, input_param, filenames, expected_shape):
233233
input_param_cpu = input_param.copy()
234234
input_param_cpu["to_gpu"] = False
235235
result_cpu = LoadImage(image_only=True, **input_param_cpu)(filenames)
236-
self.assertTrue(torch.allclose(result_cpu, result.cpu(), atol=1e-6))
236+
assert_allclose(result_cpu, result.cpu(), atol=1e-6)
237237

238238
@parameterized.expand([TEST_CASE_6, TEST_CASE_7, TEST_CASE_8, TEST_CASE_8_1, TEST_CASE_9])
239239
def test_itk_reader(self, input_param, filenames, expected_shape):

0 commit comments

Comments
 (0)