8 from mininet.util import pexpect
10 class testEmptyNet( unittest.TestCase ):
14 def testEmptyNet( self ):
15 "Run simple CLI tests: pingall (verify 0% drop) and iperf (sanity)"
16 p = pexpect.spawn( 'python -m mininet.examples.emptynet' )
17 p.expect( self.prompt )
19 p.sendline( 'pingall' )
20 p.expect ( '(\d+)% dropped' )
21 percent = int( p.match.group( 1 ) ) if p.match else -1
22 self.assertEqual( percent, 0 )
23 p.expect( self.prompt )
26 p.expect( "Results: \['[\d.]+ .bits/sec', '[\d.]+ .bits/sec'\]" )
27 p.expect( self.prompt )
31 if __name__ == '__main__':