Exemple #1
0
 def test_broken_pipe(self):
     server_process = FakeServerProcess(port_obj=TrivialMockPort(),
                                        name="test",
                                        cmd=["test"])
     server_process.write("should break")
     self.assertTrue(server_process.has_crashed())
     self.assertEquals(server_process._proc, None)
     self.assertEquals(server_process.broken_pipes, [server_process.stdin])
    def test_broken_pipe(self):
        port_obj = TrivialMockPort()

        port_obj.host.platform.os_name = 'win'
        server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
        server_process.write("should break")
        self.assertTrue(server_process.has_crashed())
        self.assertEquals(server_process._proc, None)
        self.assertEquals(server_process.broken_pipes, [server_process.stdin])

        port_obj.host.platform.os_name = 'mac'
        server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
        server_process.write("should break")
        self.assertTrue(server_process.has_crashed())
        self.assertEquals(server_process._proc, None)
        self.assertEquals(server_process.broken_pipes, [server_process.stdin])
Exemple #3
0
    def test_broken_pipe(self):
        port_obj = TrivialMockPort()

        port_obj.host.platform.os_name = 'win'
        server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
        server_process.write("should break")
        self.assertTrue(server_process.has_crashed())
        self.assertEquals(server_process._proc, None)
        self.assertEquals(server_process.broken_pipes, [server_process.stdin])

        port_obj.host.platform.os_name = 'mac'
        server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
        server_process.write("should break")
        self.assertTrue(server_process.has_crashed())
        self.assertEquals(server_process._proc, None)
        self.assertEquals(server_process.broken_pipes, [server_process.stdin])
 def test_broken_pipe(self):
     server_process = FakeServerProcess(port_obj=None, name="test", cmd=["test"])
     server_process.write("should break")
     self.assertTrue(server_process.crashed)
     self.assertEquals(server_process._proc, None)
     self.assertEquals(server_process.broken_pipes, [server_process.stdin])