'Attempt to ping an IP on the Internet and verify 0% packet loss'

@unittest.skipIf(('0    received' in quietRun(('ping    -c    1    %s' % destIP))), 'Destination    IP    is    not    reachable')
def testNAT(self):

    p = pexpect.spawn('python    -m    mininet.examples.nat')
    p.expect(self.prompt)
    p.sendline(('h1    ping    -c    1    %s' % destIP))
    p.expect('(\\d+)%    packet    loss')
    percent = (int(p.match.group(1)) if p.match else (-1))
    p.expect(self.prompt)
    p.sendline('exit')
    p.wait()
    self.assertEqual(percent, 0)
