'verify that all of the port numbers are printed correctly and consistent with their interface'

def testNumbering(self):

    p = pexpect.spawn('python    -m    mininet.examples.numberedports')
    opts = ['s1-eth(\\d+)    :        (\\d+)', pexpect.EOF]
    count_intfs = 0
    while True:
        index = p.expect(opts)
        if (index == 0):
            count_intfs += 1
            intfport = p.match.group(1)
            ofport = p.match.group(2)
            self.assertEqual(intfport, ofport)
        elif (index == 1):
            break
            self.assertNotEqual(0, count_intfs)
