From 3a8cc57a725aa064442bb5c3f5c5313826135c69 Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Fri, 20 May 2022 16:32:14 -0400 Subject: [PATCH] Update for consistency with other tests. --- test/test_modem.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/test/test_modem.py b/test/test_modem.py index ef5eb6ae..6d3d9054 100644 --- a/test/test_modem.py +++ b/test/test_modem.py @@ -8,6 +8,7 @@ import time import pytest +# pylint: disable=wrong-import-position sys.path.insert(0, "..") sys.path.insert(0, "../tnc") import helpers @@ -86,11 +87,6 @@ def t_create_start_session(mycall: str, dxcall: str) -> bytearray: return t_create_frame(221, mycall, dxcall) -def t_tsh_dummy(): - """Replacement function for transmit""" - print("In t_tsh_dummy") - - def t_modem(): """ Execute test to validate that receiving a session open frame sets the correct machine @@ -99,12 +95,6 @@ def t_modem(): t_mode = t_repeats = t_repeat_delay = 0 t_frames = [] - # enable testmode - modem.TESTMODE = True - modem.RXCHANNEL = "/tmp/hfchannel1" - modem.TXCHANNEL = "/tmp/hfchannel2" - static.HAMLIB_RADIOCONTROL = "disabled" - def t_tx_dummy(mode, repeats, repeat_delay, frames): """Replacement function for transmit""" print(f"t_tx_dummy: In transmit({mode}, {repeats}, {repeat_delay}, {frames})") @@ -115,6 +105,12 @@ def t_modem(): t_frames = frames[:] static.TRANSMITTING = False + # enable testmode + modem.TESTMODE = True + modem.RXCHANNEL = "/tmp/hfchannel1" + modem.TXCHANNEL = "/tmp/hfchannel2" + static.HAMLIB_RADIOCONTROL = "disabled" + # Create the modem local_modem = modem.RF()