def test_kernelBufferFull(self):
        """
        When L{FileDescriptor.writeSomeData} returns C{0} to indicate no more
        data can be written immediately, L{FileDescriptor.doWrite} returns
        L{None}.
        """
        descriptor = MemoryFile()
        descriptor.write(b"hello, world")
        self.assertIsNone(descriptor.doWrite())

        When L{FileDescriptor.writeSomeData} returns C{0} to indicate no more
        data can be written immediately, L{FileDescriptor.doWrite} returns
        L{None}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_filedescriptor.py