def test_serialPortInitiallyConnected(self):
        """
        Test the port is connected at initialization time, and
        C{Protocol.makeConnection} has been called on the desired protocol.
        """
        self.assertEqual(0,    self.protocol.connected)

        port = RegularFileSerialPort(self.protocol, self.path, self.reactor)
        self.assertEqual(1, port.connected)
        self.assertEqual(1, self.protocol.connected)
        self.assertEqual(port, self.protocol.transport)
        port.connectionLost(Failure(Exception("Cleanup")))

        Test the port is connected at initialization time, and
        C{Protocol.makeConnection} has been called on the desired protocol.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_win32serialport.py