def test_zeroExitCode(self):
        """
        When the command exits with a non-zero status, the protocol's
        C{connectionLost} method is called with a L{Failure} wrapping an
        exception which encapsulates that status.
        """
        exitCode = 0
        exc = self._exitStatusTest(b'exit-status', pack('>L', exitCode))
        exc.trap(ConnectionDone)

        When the command exits with a non-zero status, the protocol's
        C{connectionLost} method is called with a L{Failure} wrapping an
        exception which encapsulates that status.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_endpoints.py