()
| 22 | |
| 23 | |
| 24 | def test_RandomSampler(): |
| 25 | indices = list(range(20)) |
| 26 | indices_copy = copy.deepcopy(indices) |
| 27 | sampler = RandomSampler(ArrayDataset(indices_copy)) |
| 28 | sample_indices = sampler |
| 29 | assert indices != list(each[0] for each in sample_indices) |
| 30 | assert indices == sorted(list(each[0] for each in sample_indices)) |
| 31 | |
| 32 | |
| 33 | def test_InfiniteSampler(): |
nothing calls this directly
no test coverage detected