Skip to content

Commit

Permalink
Add test for RGB warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fepegar committed Aug 19, 2020
1 parent f101198 commit 2cd6d36
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/data/test_io.py
Expand Up @@ -38,9 +38,14 @@ def write_dicom(self):
writer.Execute(image)

def test_read_image(self):
# I need to find something readable by nib but not sitk (MINC?)
# I need to find something readable by nib but not sitk
io.read_image(self.nii_path)

def test_save_rgb(self):
im = ScalarImage(tensor=torch.rand(1, 4, 5, 1))
with self.assertWarns(UserWarning):
im.save(self.dir / 'test.jpg')

def test_read_dicom_file(self):
io.read_image(self.dicom_path)

Expand Down

0 comments on commit 2cd6d36

Please sign in to comment.