def _testSocketRegisteredBeforeConnected(self):
        timeout = 1000 # milliseconds
        poll_object = select.poll()
        # Register the socket before it is connected
        poll_object.register(self.cli, select.POLLOUT)
        result_list = poll_object.poll(timeout)
        result_sockets = [r[0] for r in result_list]
        self.failIf(self.cli in result_sockets, "Unconnected client socket should not have been selectable")
        # Now connect the socket, but DO NOT register it again
        self.cli.setblocking(0)
        self.cli.connect( (test_socket.HOST, test_socket.PORT) )
        # Now poll again, to check that the poll object has recognised that the socket is now connected
        result_list = poll_object.poll(timeout)
        result_sockets = [r[0] for r in result_list]
        self.failUnless(result_sockets in self.cli, "Connected client socket should have been selectable")
dataset/ETHPy150Open babble/babble/include/jython/Lib/test/test_select.py/ThreadedPollClientSocket._testSocketRegisteredBeforeConnected/swapped operands of `in`