8 from subprocess import check_output
10 class testMobility( unittest.TestCase ):
12 def testMobility( self ):
13 "Run the example and verify its 4 ping results"
14 cmd = 'python -m mininet.examples.mobility 2>&1'
15 grep = ' | grep -c " 0% dropped" '
16 result = check_output( cmd + grep, shell=True )
17 assert int( result ) == 4
19 if __name__ == '__main__':