Lines Matching refs:from_buffer
3629 c = from_buffer(BCharA, a)
3641 p1 = from_buffer(BCharA, b"foo")
3642 assert p1 == from_buffer(BCharA, b"foo")
3644 assert p1 == from_buffer(BCharA, b"foo")
3645 py.test.raises(TypeError, from_buffer, BCharA, u+"foo")
3652 contents = from_buffer(BCharA, buffer(b"foo"))
3657 contents = from_buffer(BCharA, buffer(u+"foo"))
3666 contents = from_buffer(BCharA, memoryview(b"foo"))
3677 p = from_buffer(BCharA, a)
3697 c = from_buffer(BCharA, bufobj)
3748 p1 = from_buffer(BCharA, b"foo", False)
3749 assert p1 == from_buffer(BCharA, b"foo", False)
3750 py.test.raises((TypeError, BufferError), from_buffer, BCharA, b"foo", True)
3752 p1 = from_buffer(BCharA, ba, True)
3763 p1 = from_buffer(BIntA, bytestring) # int[]
3772 py.test.raises(TypeError, from_buffer, BInt, bytestring)
3773 py.test.raises(TypeError, from_buffer, BIntP, bytestring)
3776 p2 = from_buffer(BIntA2, bytestring) # int[2]
3786 py.test.raises(ValueError, from_buffer, BIntA4, bytestring)
3793 p1 = from_buffer(BStructA, bytestring) # struct[]
3805 py.test.raises(ZeroDivisionError, from_buffer, # empty[]
3809 p1 = from_buffer(BEmptyStructA5, bytestring) # struct empty[5]
3812 assert cast(BIntP, p1) == from_buffer(BIntA, bytestring)
4225 p = from_buffer(BCharA, a)
4236 p = from_buffer(BCharA, a)
4250 p = from_buffer(BCharA, a)