mirror of
https://github.com/espressif/openthread.git
synced 2026-10-04 14:57:38 +00:00
[style] update python style to conform to PEP 8 (#3951)
With the exception of line length set to 119 vs. 79. Add tests/ and tools/ to py-pretty-check.
This commit is contained in:
@@ -27,12 +27,9 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import config
|
||||
import mle
|
||||
import network_layer
|
||||
import node
|
||||
|
||||
LEADER = 1
|
||||
@@ -40,7 +37,6 @@ ROUTER = 2
|
||||
|
||||
|
||||
class TestCoaps(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.simulator = config.create_default_simulator()
|
||||
|
||||
@@ -60,9 +56,9 @@ class TestCoaps(unittest.TestCase):
|
||||
self.nodes[ROUTER].set_router_selection_jitter(1)
|
||||
|
||||
def tearDown(self):
|
||||
for node in list(self.nodes.values()):
|
||||
node.stop()
|
||||
node.destroy()
|
||||
for n in list(self.nodes.values()):
|
||||
n.stop()
|
||||
n.destroy()
|
||||
self.simulator.stop()
|
||||
|
||||
def test(self):
|
||||
@@ -86,7 +82,7 @@ class TestCoaps(unittest.TestCase):
|
||||
self.nodes[LEADER].coaps_stop()
|
||||
|
||||
self.nodes[LEADER].coaps_start_x509()
|
||||
#self.nodes[LEADER].coaps_set_resource_path('test')
|
||||
# self.nodes[LEADER].coaps_set_resource_path('test')
|
||||
self.nodes[ROUTER].coaps_start_x509()
|
||||
self.nodes[ROUTER].coaps_connect(mleid)
|
||||
self.nodes[ROUTER].coaps_get()
|
||||
@@ -94,5 +90,6 @@ class TestCoaps(unittest.TestCase):
|
||||
self.nodes[ROUTER].coaps_stop()
|
||||
self.nodes[LEADER].coaps_stop()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user