()
| 87 | |
| 88 | |
| 89 | def test_Compose(): |
| 90 | t = Compose( |
| 91 | [ |
| 92 | CenterCrop(output_size=CenterCrop_size), |
| 93 | RandomHorizontalFlip(prob=1), |
| 94 | ToMode(mode="CHW"), |
| 95 | ] |
| 96 | ) |
| 97 | aug_data = t.apply_batch(generate_data()) |
| 98 | aug_data_shape = [(a.shape, b.shape) for a, b in aug_data] |
| 99 | target_shape = [((3, 90, 70), label_shape)] * 4 |
| 100 | assert aug_data_shape == target_shape, "aug {}, target {}".format( |
| 101 | aug_data_shape, target_shape |
| 102 | ) |
nothing calls this directly
no test coverage detected