8 from mininet.util import pexpect
11 class testTreePing64( unittest.TestCase ):
15 @unittest.skipIf( '-quick' in sys.argv, 'long test' )
16 def testTreePing64( self ):
17 "Run the example and verify ping results"
18 p = pexpect.spawn( 'python -m mininet.examples.treeping64' )
19 p.expect( 'Tree network ping results:', timeout=6000 )
22 index = p.expect( [ '(\d+)% packet loss', pexpect.EOF ] )
24 percent = int( p.match.group( 1 ) ) if p.match else -1
25 self.assertEqual( percent, 0 )
29 self.assertTrue( count > 0 )
31 if __name__ == '__main__':