mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract Class Reference
Inheritance diagram for mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract:

## Public Member Functions

| notify_complete (self, result=None)
| Notify main even loop that host test finished processing.
| reset_dut (self, value)
| reset (self)
| notify_conn_lost (self, text)
| Notify main even loop that there was a DUT-host test connection error.
| log (self, text)
| Send log message to main event loop.
| send_kv (self, key, value)
| Send Key-Value data to DUT.
| setup_communication (self, event_queue, dut_event_queue, config={})
| Setup queues used for IPC.
| get_config_item (self, name)
| setup (self)
| Setup your tests and callbacks.
| result (self)
| Returns host test result (True, False or None)
| teardown (self)
| Blocking always guaranteed test teardown.

## Static Public Attributes

str | name = ''
| script_location = None

## Detailed Description

     Base class for each host-test test cases with standard
        setup, test and teardown set of functions

Definition at line 23 of file base_host_test.py.

## Member Function Documentation

## get_config_item()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.get_config_item | ( |  | self,
|  |  | name
| ) |  |

    Return test config

    :param name:
    :return:

Definition at line 94 of file base_host_test.py.

## log()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.log | ( |  | self,
|  |  | text
| ) |  |

Send log message to main event loop.

Definition at line 80 of file base_host_test.py.

## notify_complete()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.notify_complete | ( |  | self,
|  |  | result = `None`
| ) |  |

Notify main even loop that host test finished processing.

Parameters

  result | True for success, False failure. If None - no action in main even loop

Definition at line 51 of file base_host_test.py.

## notify_conn_lost()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.notify_conn_lost | ( |  | self,
|  |  | text
| ) |  |

Notify main even loop that there was a DUT-host test connection error.

Parameters

  consume | If True htrun will process (consume) all remaining events

Definition at line 74 of file base_host_test.py.

## reset()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.reset | ( |  | self | ) |

    Reset the device under test and continue running the host test
    :return:

Definition at line 66 of file base_host_test.py.

## reset_dut()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.reset_dut | ( |  | self,
|  |  | value
| ) |  |

    Reset device under test
    :return:

Definition at line 58 of file base_host_test.py.

## result()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.result | ( |  | self | ) |

Returns host test result (True, False or None)

Reimplemented in mbed_host_tests.host_tests.base_host_test.HostTestCallbackBase.

Definition at line 107 of file base_host_test.py.

## send_kv()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.send_kv | ( |  | self,
|  |  | key,
|  |  | value
| ) |  |

Send Key-Value data to DUT.

Definition at line 84 of file base_host_test.py.

## setup()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.setup | ( |  | self | ) |

Setup your tests and callbacks.

Reimplemented in mbed_host_tests.host_tests.base_host_test.HostTestCallbackBase.

Definition at line 103 of file base_host_test.py.

## setup_communication()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.setup_communication | ( |  | self,
|  |  | event_queue,
|  |  | dut_event_queue,
|  |  | config = `{}`
| ) |  |

Setup queues used for IPC.

Definition at line 88 of file base_host_test.py.

## teardown()

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.teardown | ( |  | self | ) |

Blocking always guaranteed test teardown.

Reimplemented in mbed_host_tests.host_tests.base_host_test.HostTestCallbackBase.

Definition at line 111 of file base_host_test.py.

## Member Data Documentation

## name

str mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.name = ''

static

Definition at line 28 of file base_host_test.py.

## script_location

mbed_host_tests.host_tests.base_host_test.BaseHostTestAbstract.script_location = None

static

Definition at line 31 of file base_host_test.py.

The documentation for this class was generated from the following file:

- mbed_host_tests/host_tests/base_host_test.py