'Generic topology-with-options test runner.'

def runOptionsTopoTest(self, n, msg, hopts=None, lopts=None):

    mn = Mininet(topo=SingleSwitchOptionsTopo(n=n, hopts=hopts, lopts=lopts), host=CPULimitedHost, link=TCLink, switch=self.switchClass, waitConnected=True)
    dropped = mn.run(mn.ping)
    hoptsStr = ',    '.join((('%s:    %s' % (opt, value)) for (opt, value) in hopts.items()))
    loptsStr = ',    '.join((('%s:    %s' % (opt, value)) for (opt, value) in lopts.items()))
    msg += ('%s%%    of    pings    were    dropped    during    mininet.ping().\nTopo    =    SingleSwitchTopo,    %s    hosts\nhopts    =    %s\nlopts    =    %s\nhost    =    CPULimitedHost\nlink    =    TCLink\nSwitch    =    %s\n' % (dropped, n, hoptsStr, loptsStr, self.switchClass))
    self.assertEqual(dropped, 0, msg=msg)
