'Verify that there are no dropped packets for each host'

def pingTest(self, name):

    p = pexpect.spawn(('python    -m    %s' % name))
    opts = ['<(h\\d+)>:    PING    ', '<(h\\d+)>:    (\\d+)    packets    transmitted,    (\\d+)    received', pexpect.EOF]
    pings = {}
    while True:
        index = p.expect(opts)
        if (index == 0):
            name = p.match.group(1)
            pings[name] = 0
        elif (index == 1):
            name = p.match.group(1)
            transmitted = p.match.group(2)
            received = p.match.group(3)
            self.assertEqual(received, transmitted)
            pings[name] += 1
        else:
            break
    self.assertTrue((len(pings) > 0))
    for count in pings.values():
        self.assertEqual(count, 1)
