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

tests.data.sampler.test_label_sampler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A TestLabelSampler.test_label_sampler() 0 3 1
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