def test_write_after_close(self):
    self.buffer.close()
    self.buffer.write((b'1' * 8192))
    self.assertEqual(self.buffer.length, 0)
    self.assertTrue(self.buffer.closed)
def test_write_after_close(self):
    self.buffer.close()
    self.buffer.write((b'1' * 8192))
    self.assertEqual(self.buffer.length, 0)
    self.assertTrue(self.buffer.closed)