def test__run_command_with_match_on_hex(): try: tide_handler = Tide('test_mock') tide_handler.start() tide_handler.run_config_command("test_command") result = Config().get_variable("test_match_variable") tide_handler.stop() assert result == '0x00001234abcd' except Exception as ex: pytest.fail("error in filter tests: " + str(ex))
def test__can_run_command_and_set_test_buffer_has_value(): try: test_tide = Tide() command_handler = CommandHandler() command_handler.spawn_process() buffer_result = Config().get_internal_buffer_caches() test_tide.run_config_command('test_command') assert len(buffer_result["test_buffer"]) == 3 except Exception as ex: pytest.fail("error initialising CommandHandler: " + str(ex))
def test__run_command_with_match_on_array(): try: tide_handler = Tide() tide_handler.start() tide_handler.run_config_command("test_command") result = Config().get_variable("test_match_array") tide_handler.stop() assert '0x00001234abce' in result assert '0x000000009876' in result except Exception as ex: pytest.fail("error in filter tests: " + str(ex))
def test__can_run_command_and_set_test_buffer_has_value_of_line(): try: test_tide = Tide() command_handler = CommandHandler() command_handler.spawn_process() buffer_result = Config().get_internal_buffer_caches() test_tide.run_config_command('test_command') assert buffer_result["test_buffer"][0] == 'echo "hello"\r' assert buffer_result["test_buffer"][1] == 'hello\r' assert buffer_result["test_buffer"][ 2] == '/work/tide/tests/pytest_tests # \x1b[6n' except Exception as ex: pytest.fail("error initialising CommandHandler: " + str(ex))