Beispiel #1
0
 def __init__(self,
              event_callback=None,
              log=logging,
              use_channel=False,
              channel_is_stdio=False,
              **kwargs):
     PIDantic.__init__(self,
                       event_callback=event_callback,
                       log=log,
                       use_channel=use_channel,
                       channel_is_stdio=channel_is_stdio)
     self._sm = PIDanticStateMachine(self, log=log)
Beispiel #2
0
 def __init__(self, event_callback=None, log=logging, use_channel=False, channel_is_stdio=False, **kwargs):
     PIDantic.__init__(self, event_callback=event_callback, log=log, use_channel=use_channel, channel_is_stdio=channel_is_stdio)
     self._sm = PIDanticStateMachine(self, log=log)
Beispiel #3
0
    def test_base_ui(self):

        pidant = PIDantic()

        try:
            pidant.is_done()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.poll()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.send_stdin("ssss")
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.get_state()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.recv_stdout()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.recv_stderr()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.send_channel("ssss")
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.recv_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.recv_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass


        try:
            pidant.terminate()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.has_stderr()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_stdin()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_stdout()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_write_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_read_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
Beispiel #4
0
    def test_base_ui(self):

        pidant = PIDantic()

        try:
            pidant.is_done()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.poll()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.send_stdin("ssss")
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.get_state()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.recv_stdout()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.recv_stderr()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.send_channel("ssss")
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.recv_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.recv_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.terminate()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass

        try:
            pidant.has_stderr()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_stdin()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_stdout()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_write_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass
        try:
            pidant.has_read_channel()
            self.assertFalse(True, "should have raised an exception")
        except PIDanticUsageException:
            pass