From 235415cf494eab2bdd12a5a9ff9f17d53a85241c Mon Sep 17 00:00:00 2001
From: Bob Lantz <rlantz@cs.stanford.edu>
Date: Fri, 26 Feb 2010 17:25:38 -0800
Subject: [PATCH] Ran unpep8 on test_nets.py.

---
 mininet/test/test_nets.py | 60 +++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/mininet/test/test_nets.py b/mininet/test/test_nets.py
index 699d04b3..5a3ade26 100755
--- a/mininet/test/test_nets.py
+++ b/mininet/test/test_nets.py
@@ -1,8 +1,7 @@
 #!/usr/bin/env python
-'''@package mininet
 
-Test creation and all-pairs ping for each included mininet topo type.
-'''
+"""Package: mininet
+   Test creation and all-pairs ping for each included mininet topo type."""
 
 import unittest
 
@@ -11,46 +10,47 @@
 from mininet.topo import SingleSwitchTopo, LinearTopo
 
 # temporary, until user-space side is tested
-SWITCHES = {'kernel': KernelSwitch}
+SWITCHES = { 'kernel': KernelSwitch }
 
 
-class testSingleSwitch(unittest.TestCase):
-    '''For each datapath type, test ping with single switch topologies.'''
+class testSingleSwitch( unittest.TestCase ):
+    "For each datapath type, test ping with single switch topologies."
 
-    def testMinimal(self):
-        '''Ping test with both datapaths on minimal topology'''
+    def testMinimal( self ):
+        "Ping test with both datapaths on minimal topology"
         init()
         for switch in SWITCHES.values():
-            controller_params = ControllerParams(0x0a000000, 8) # 10.0.0.0/8
-            mn = Mininet(SingleSwitchTopo(), switch, Host, Controller,
-                         controller_params)
-            dropped = mn.run('ping')
-            self.assertEqual(dropped, 0)
-
-    def testSingle5(self):
-        '''Ping test with both datapaths on 5-host single-switch topology'''
+            controllerParams = ControllerParams( 0x0a000000, 8 ) # 10.0.0.0/8
+            mn = Mininet( SingleSwitchTopo(), switch, Host, Controller,
+                         controllerParams )
+            dropped = mn.run( 'ping' )
+            self.assertEqual( dropped, 0 )
+
+    def testSingle5( self ):
+        "Ping test with both datapaths on 5-host single-switch topology"
         init()
         for switch in SWITCHES.values():
-            controller_params = ControllerParams(0x0a000000, 8) # 10.0.0.0/8
-            mn = Mininet(SingleSwitchTopo(k = 5), switch, Host, Controller,
-                         controller_params)
-            dropped = mn.run('ping')
-            self.assertEqual(dropped, 0)
+            controllerParams = ControllerParams( 0x0a000000, 8 ) # 10.0.0.0/8
+            mn = Mininet( SingleSwitchTopo( k=5 ), switch, Host, Controller,
+                         controllerParams )
+            dropped = mn.run( 'ping' )
+            self.assertEqual( dropped, 0 )
 
 
-class testLinear(unittest.TestCase):
-    '''For each datapath type, test all-pairs ping with LinearNet.'''
+class testLinear( unittest.TestCase ):
+    "For each datapath type, test all-pairs ping with LinearNet."
 
-    def testLinear5(self):
-        '''Ping test with both datapaths on a 5-switch topology'''
+    def testLinear5( self ):
+        "Ping test with both datapaths on a 5-switch topology"
         init()
         for switch in SWITCHES.values():
-            controller_params = ControllerParams(0x0a000000, 8) # 10.0.0.0/8
-            mn = Mininet(LinearTopo(k = 5), switch, Host, Controller,
-                         controller_params)
-            dropped = mn.run('ping')
-            self.assertEqual(dropped, 0)
+            controllerParams = ControllerParams( 0x0a000000, 8 ) # 10.0.0.0/8
+            mn = Mininet( LinearTopo( k=5 ), switch, Host, Controller,
+                         controllerParams )
+            dropped = mn.run( 'ping' )
+            self.assertEqual( dropped, 0 )
 
 
 if __name__ == '__main__':
     unittest.main()
+
-- 
GitLab