[scripts] fix test_route_table.py (#5558)

This commit is contained in:
Simon Lin
2020-09-26 20:22:50 -07:00
committed by GitHub
parent dc94758e84
commit efccfe2252
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -159,6 +159,7 @@ EXTRA_DIST = \
test_network_layer.py \
test_reed_address_solicit_rejected.py \
test_reset.py \
test_route_table.py \
test_router_reattach.py \
test_service.py \
thread_cert.py \
@@ -205,6 +206,7 @@ check_SCRIPTS = \
test_network_layer.py \
test_reed_address_solicit_rejected.py \
test_reset.py \
test_route_table.py \
test_router_reattach.py \
test_service.py \
Cert_5_1_01_RouterAttach.py \
+2 -2
View File
@@ -1809,7 +1809,7 @@ class NodeImpl:
self._expect([r'(\d+)((\s\d+)*)'])
g = self.pexpect.match.groups()
router_list = g[0] + ' ' + g[1]
router_list = g[0].decode('utf8') + ' ' + g[1].decode('utf8')
router_list = [int(x) for x in router_list.split()]
self._expect('Done')
return router_list
@@ -1820,7 +1820,7 @@ class NodeImpl:
self._expect(r'(.*)Done')
g = self.pexpect.match.groups()
output = g[0]
output = g[0].decode('utf8')
lines = output.strip().split('\n')
lines = [l.strip() for l in lines]
router_table = {}
@@ -41,6 +41,8 @@ ROUTER2 = 3
class TestRouteTable(thread_cert.TestCase):
SUPPORT_NCP = False
TOPOLOGY = {
LEADER: {
'mode': 'rsdn',