[issue21856] memoryview: test slick clamping

2014-06-28 Thread Stefan Krah
Stefan Krah added the comment: Since the rewrite in 3.3 many memoryview tests are actually in test_buffer.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21856 ___

[issue21856] memoryview: test slick clamping

2014-06-28 Thread Stefan Krah
Stefan Krah added the comment: And Terry is right, the actual slice clamping happens in PySlice_GetIndicesEx(), which should always produce values that are in the correct range. Hence the tests focus on slices that already are in the correct range. I'm not sure if PySlice_GetIndicesEx() itself

[issue21856] memoryview: test slick clamping

2014-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Memoryview should definitely have the same slice tests as other sequence objects. Go ahead and check. I believe slice clamping itself should now be done by slice.indices, not by each class. S.indices(len) - (start, stop, stride) Assuming a