[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:
Jonathan Hui
2019-07-11 11:45:55 -04:00
committed by GitHub
parent a938ee2845
commit f924adcb60
341 changed files with 8702 additions and 4460 deletions
+5 -8
View File
@@ -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()