| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import torch |
||
| 2 | import torchio |
||
| 3 | import numpy as np |
||
| 4 | from torchio.data.sampler import RandomSampler |
||
| 5 | from ...utils import TorchioTestCase |
||
| 6 | |||
| 7 | |||
| 8 | class TestRandomSampler(TorchioTestCase): |
||
| 9 | """Tests for `RandomSampler` class.""" |
||
| 10 | def test_not_implemented(self): |
||
| 11 | sampler = RandomSampler(1) |
||
| 12 | with self.assertRaises(NotImplementedError): |
||
| 13 | sampler(self.sample, 5) |
||
| 14 | with self.assertRaises(NotImplementedError): |
||
| 15 | sampler.get_probability_map(self.sample) |
||
| 16 |