[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
+6 -4
View File
@@ -35,10 +35,11 @@ import node
LEADER = 1
ROUTER = 2
class Test_MacScan(unittest.TestCase):
def setUp(self):
self.nodes = {}
for i in range(1,3):
for i in range(1, 3):
self.nodes[i] = node.Node(i)
self.nodes[LEADER].set_panid(0xface)
@@ -56,9 +57,9 @@ class Test_MacScan(unittest.TestCase):
self.nodes[ROUTER].set_network_name('OpenThread')
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()
def test(self):
self.nodes[LEADER].start()
@@ -72,5 +73,6 @@ class Test_MacScan(unittest.TestCase):
results = self.nodes[LEADER].scan()
self.assertEqual(len(results), 16)
if __name__ == '__main__':
unittest.main()