Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(96409)

Delta Between Two Patch Sets: Lib/test/test_buffer.py

Issue 16510: Using appropriate checks in tests
Left Patch Set: Created 5 years, 9 months ago
Right Patch Set: Created 5 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_bisect.py ('k') | Lib/test/test_builtin.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # 1 #
2 # The ndarray object from _testbuffer.c is a complete implementation of 2 # The ndarray object from _testbuffer.c is a complete implementation of
3 # a PEP-3118 buffer provider. It is independent from NumPy's ndarray 3 # a PEP-3118 buffer provider. It is independent from NumPy's ndarray
4 # and the tests don't require NumPy. 4 # and the tests don't require NumPy.
5 # 5 #
6 # If NumPy is present, some tests check both ndarray implementations 6 # If NumPy is present, some tests check both ndarray implementations
7 # against each other. 7 # against each other.
8 # 8 #
9 # Most ndarray tests also check that memoryview(ndarray) behaves in 9 # Most ndarray tests also check that memoryview(ndarray) behaves in
10 # the same way as the original. Thus, a substantial part of the 10 # the same way as the original. Thus, a substantial part of the
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after
4285 nd = ndarray([1,2,3], [3], flags=ND_GETBUF_FAIL|ND_GETBUF_UNDEFINED) 4285 nd = ndarray([1,2,3], [3], flags=ND_GETBUF_FAIL|ND_GETBUF_UNDEFINED)
4286 self.assertRaises(BufferError, memoryview, nd) 4286 self.assertRaises(BufferError, memoryview, nd)
4287 4287
4288 def test_issue_7385(self): 4288 def test_issue_7385(self):
4289 x = ndarray([1,2,3], shape=[3], flags=ND_GETBUF_FAIL) 4289 x = ndarray([1,2,3], shape=[3], flags=ND_GETBUF_FAIL)
4290 self.assertRaises(BufferError, memoryview, x) 4290 self.assertRaises(BufferError, memoryview, x)
4291 4291
4292 4292
4293 if __name__ == "__main__": 4293 if __name__ == "__main__":
4294 unittest.main() 4294 unittest.main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+