Home | History | Annotate | Download | only in test

Lines Matching refs:memoryview

1 """Unit tests for the memoryview
70 self.assertRaises(TypeError, setitem, memoryview(b"a"))
205 # Test PyObject_GetBuffer() on a memoryview object.
225 self.m = memoryview(base)
231 # Create a reference cycle through a memoryview object.
276 self.assertNotEqual(m, memoryview(tp(self._source)))
302 # Issue #10451: memoryview incorrectly exposes a readonly
324 # Releasing the memoryview keeps the stored hash value (as with weakrefs)
327 # Hashing a memoryview for the first time after it is released
367 x = memoryview(a)
371 d = memoryview(b)
414 # Variations on indirection levels: memoryview, slice of memoryview,
415 # slice of slice of memoryview.
420 return memoryview(obj)
429 m = memoryview(obj)
437 m = memoryview(tp(self._source))
446 m = memoryview(obj)
461 self.assertTrue(memoryview(ob))
462 self.assertTrue(memoryview(object=ob))
463 self.assertRaises(TypeError, memoryview)
464 self.assertRaises(TypeError, memoryview, ob, ob)
465 self.assertRaises(TypeError, memoryview, argument=ob)
466 self.assertRaises(TypeError, memoryview, ob, argument=True)
472 # Issue #4569: segfault when mutating a memoryview with itemsize != 1
474 m = memoryview(a)
504 m = memoryview(d).cast("B")
512 m = memoryview(d).cast(format)
513 m[:2] = memoryview(p6).cast(format)[:2]
514 m[2:] = memoryview(p6).cast(format)[2:]
518 # Issue #9951: memoryview.hex() segfaults with non-contiguous buffers.
520 m1 = memoryview(x)
525 m = memoryview(b'abc')
530 m = memoryview(b'abc')