def METHOD_NAME(self, s):
    s = np.str_(s)  # only our subclass implements the buffer protocol
    # all the same, characters always encode as ucs4
    expected = dict(strides=(), itemsize=8, ndim=0, shape=(), format='2w',
                    readonly=True)
    v = memoryview(s)
    assert self._as_dict(v) == expected
    # integers of the paltform-appropriate endianness
    code_points = np.frombuffer(v, dtype='i4')
    assert_equal(code_points, [ord(c) for c in s])
    # Check that we do not allow writeable buffer export
    with pytest.raises(BufferError, match="scalar buffer is readonly"):
        get_buffer_info(s, ["WRITABLE"])