Skip to content

Commit

Permalink
add base tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed May 4, 2024
1 parent 63fc37c commit e09880c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,27 @@ def test_Translate(self):
img2d_tx = my_tx(img2d)

img3d_tx = my_tx(img3d)

class TestErrors(unittest.TestCase):

def setUp(self):
pass

def tearDown(self):
pass

def test_base_transform(self):
from nitrain.transforms import BaseTransform
tx = BaseTransform()

with self.assertRaises(NotImplementedError):
tx.fit()

with self.assertRaises(NotImplementedError):
tx.__call__()

with self.assertRaises(NotImplementedError):
tx.__repr__()

if __name__ == '__main__':
run_tests()

0 comments on commit e09880c

Please sign in to comment.