def test_socket_io_disconnect(self):
        def f():
            s = 0
            for i in xrange(100000000):
                s = s + ((1-i)/(i+1))**2
            return s

        with self.create_executor() as executor:
            future = executor.submit(f)
            socketInterface = executor.connection.webObjectFactory.jsonInterface
            socketInterface.disconnect()
            with self.assertRaises(pyfora.PyforaError) as cm:
                future.result()

            error_content = cm.exception.message
            self.assertEqual(error_content['responseType'], 'Failure')
            self.assertEqual(error_content['message'], 'Disconnected from server')
dataset/ETHPy150Open ufora/ufora/ufora/FORA/python/PurePython/InMemoryExecutorTestCases.py/InMemoryExecutorTestCases.test_socket_io_disconnect/swapped operands of `-`