From d2201f1b32f2ae9fd051cdce5b2e113309ff749f Mon Sep 17 00:00:00 2001 From: speakinghedge Date: Mon, 15 Jan 2018 08:52:20 +0100 Subject: [PATCH] don't use underscore as dummy var in tests #957 --- test/linux.uts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/linux.uts b/test/linux.uts index ec0c0a478..e160a4e3c 100644 --- a/test/linux.uts +++ b/test/linux.uts @@ -134,7 +134,7 @@ from mock import patch # can't remove the lo device (or its address without causing trouble) - use some pseudo dummy instead with patch('scapy.consts.LOOPBACK_NAME', 'scapy_lo_x'): - _ = read_routes() + routes = read_routes() = catch looback device no address assigned ~ linux needs_root @@ -148,7 +148,7 @@ exit_status = os.system("ip link set dev scapy_lo up") assert(exit_status == 0) with patch('scapy.consts.LOOPBACK_NAME', 'scapy_lo'): - _ = read_routes() + routes = read_routes() exit_status = os.system("ip addr add dev scapy_lo 10.10.0.1/24") assert(exit_status == 0) @@ -158,7 +158,7 @@ with patch('scapy.consts.LOOPBACK_NAME', 'scapy_lo'): got_lo_device = False for route in routes: - dst_int, msk_int, _, if_name, if_addr, _ = route + dst_int, msk_int, gw_str, if_name, if_addr, metric = route if if_name == 'scapy_lo': got_lo_device = True assert(if_addr == '10.10.0.1')