Restore Python 3.6 compatibility

This commit is contained in:
Paul Kronenwetter 2022-07-04 17:09:08 -04:00
parent 4a50c9c9d0
commit cd00eaa851
9 changed files with 28 additions and 14 deletions

View file

@ -221,7 +221,9 @@ def test_chat_text(
for p_item in proc:
assert p_item.exitcode == 0
p_item.close()
# p_item.close() # Python 3.7+ only
p_item.terminate()
p_item.join()
analyze_results(s1_data, s2_data, STATIONS)

View file

@ -275,7 +275,9 @@ def test_datac0(frame_type: str, tmp_path):
for p_item in proc:
assert p_item.exitcode == 0
p_item.close()
# p_item.close() # Python 3.7+ only
p_item.terminate()
p_item.join()
analyze_results(s1_data, s2_data, STATIONS)

View file

@ -242,7 +242,9 @@ def test_datac0_negative(frame_type: str, tmp_path):
for p_item in proc:
assert p_item.exitcode == 0
p_item.close()
# p_item.close() # Python 3.7+ only
p_item.terminate()
p_item.join()
analyze_results(s1_data, s2_data, STATIONS)

View file

@ -75,7 +75,7 @@ def t_HighSNR_C_P_DATACx(
tx_side = path
break
print(f"{tx_side=} / {rx_side=}")
print(f"tx_side={tx_side} / rx_side={rx_side}")
with subprocess.Popen(
args=[
@ -178,7 +178,9 @@ def test_HighSNR_C_P_DATACx(
proc.terminate()
assert proc.exitcode == 0
proc.close()
# proc.close() # Python 3.7+ only
proc.terminate()
proc.join()
if __name__ == "__main__":

View file

@ -73,7 +73,7 @@ def t_HighSNR_P_C_DATACx(bursts: int, frames_per_burst: int, mode: str):
tx_side = os.path.join("test", tx_side)
os.environ["PYTHONPATH"] += ":."
print(f"{tx_side=} / {rx_side=}")
print(f"tx_side={tx_side} / rx_side={rx_side}")
with subprocess.Popen(
args=[
@ -178,7 +178,9 @@ def test_HighSNR_P_C_DATACx(bursts: int, frames_per_burst: int, mode: str):
proc.terminate()
assert proc.exitcode == 0
proc.close()
# proc.close() # Python 3.7+ only
proc.terminate()
proc.join()
if __name__ == "__main__":

View file

@ -61,7 +61,7 @@ def t_HighSNR_P_P_DATACx(bursts: int, frames_per_burst: int, mode: str):
rx_side = os.path.join("test", rx_side)
os.environ["PYTHONPATH"] += ":."
print(f"{tx_side=} / {rx_side=}")
print(f"tx_side={tx_side} / rx_side={rx_side}")
with subprocess.Popen(
args=[
@ -139,7 +139,9 @@ def test_HighSNR_P_P_DATACx(bursts: int, frames_per_burst: int, mode: str):
proc.terminate()
assert proc.exitcode == 0
proc.close()
# proc.close() # Python 3.7+ only
proc.terminate()
proc.join()
if __name__ == "__main__":

View file

@ -61,7 +61,7 @@ def t_HighSNR_P_P_Multi(bursts: int, frames_per_burst: int):
rx_side = os.path.join("test", rx_side)
os.environ["PYTHONPATH"] += ":."
print(f"{tx_side=} / {rx_side=}")
print(f"tx_side={tx_side} / rx_side={rx_side}")
with subprocess.Popen(
args=[
@ -134,7 +134,9 @@ def test_HighSNR_P_P_multi(bursts: int, frames_per_burst: int):
proc.terminate()
assert proc.exitcode == 0
proc.close()
# proc.close() # Python 3.7+ only
proc.terminate()
proc.join()
if __name__ == "__main__":

View file

@ -253,7 +253,7 @@ def test_foreign_disconnect(mycall: str, dxcall: str):
proc.terminate()
proc.join()
# print(f"\n{proc.exitcode=}")
# print(f"\nproc.exitcode={proc.exitcode}")
assert proc.exitcode == 0
@ -271,7 +271,7 @@ def test_valid_disconnect(mycall: str, dxcall: str):
proc.terminate()
proc.join()
# print(f"\n{proc.exitcode=}")
# print(f"\nproc.exitcode={proc.exitcode}")
assert proc.exitcode == 0

View file

@ -360,7 +360,7 @@ class DATA:
while static.TRANSMITTING:
time.sleep(0.01)
def send_data_to_socket_queue(self, /, **jsondata):
def send_data_to_socket_queue(self, **jsondata):
"""
Send information to the UI via JSON and the sock.SOCKET_QUEUE.