Passed
Pull Request — master (#175)
by Fernando
01:01
created

TestLabelSampler.test_label_sampler()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
from torchio.data import LabelSampler
2
from ...utils import TorchioTestCase
3
4
5
class TestLabelSampler(TorchioTestCase):
6
    """Tests for `LabelSampler` class."""
7
8
    def test_label_sampler(self):
9
        sampler = LabelSampler(5, 'label')
10
        next(iter(sampler(self.sample)))
11