[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
@@ -27,7 +27,6 @@
# POSSIBILITY OF SUCH DAMAGE.
#
import time
import unittest
import config
@@ -36,12 +35,13 @@ import node
LEADER = 1
ED = 2
class Cert_6_3_2_NetworkDataUpdate(unittest.TestCase):
def setUp(self):
self.simulator = config.create_default_simulator()
self.nodes = {}
for i in range(1,3):
for i in range(1, 3):
self.nodes[i] = node.Node(i, (i == ED), simulator=self.simulator)
self.nodes[LEADER].set_panid(0xface)
@@ -56,9 +56,9 @@ class Cert_6_3_2_NetworkDataUpdate(unittest.TestCase):
self.nodes[ED].set_timeout(10)
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):
@@ -106,5 +106,6 @@ class Cert_6_3_2_NetworkDataUpdate(unittest.TestCase):
if addr[0:10] == '2001:2:0:1' or addr[0:10] == '2001:2:0:2':
self.assertTrue(self.nodes[LEADER].ping(addr))
if __name__ == '__main__':
unittest.main()