def test_reuse_input(self):
    'Objects should be reusable after write()'
    original = b'original'
    tests = [bytearray(original), memoryview(bytearray(original))]
    for data in tests:
        self.buffer.write(data)
        data[:] = b'reused!!'
        self.assertEqual(self.buffer.read(), original)
Objects should be reusable after write()
def test_reuse_input(self):
    
    original = b'original'
    tests = [bytearray(original), memoryview(bytearray(original))]
    for data in tests:
        self.buffer.write(data)
        data[:] = b'reused!!'
        self.assertEqual(self.buffer.read(), original)