()
| 27 | |
| 28 | @pytest.mark.local |
| 29 | def test_circular_scalar(): |
| 30 | buf = TensorQueue(torch.Size((10,)), grow_dim=0, device=torch.device('cpu'), dtype=torch.long) |
| 31 | for value in range(50): |
| 32 | buf.push_scalar(value) |
| 33 | content = buf.tensor |
| 34 | assert ((content[1:] - content[:-1]) == 1).all(), "Unexpected result." |
| 35 | |
| 36 | |
| 37 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected