Skip to content
Snippets Groups Projects
Commit c45bfab3 authored by Bob Lantz's avatar Bob Lantz
Browse files

Add cleanup

parent b2fcab82
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
Test creation and all-pairs ping for each included mininet topo type."""
import unittest
import sys
from functools import partial
from mininet.net import Mininet
......@@ -12,6 +13,7 @@
from mininet.topo import SingleSwitchTopo, LinearTopo
from mininet.log import setLogLevel
from mininet.util import quietRun
from mininet.clean import cleanup
# Tell pylint not to complain about calls to other class
# pylint: disable=E1101
......@@ -21,6 +23,11 @@ class testSingleSwitchCommon( object ):
switchClass = None # overridden in subclasses
def tearDown( self ):
"Clean up if necessary"
if sys.exc_info != ( None, None, None ):
cleanup()
def testMinimal( self ):
"Ping test on minimal topology"
mn = Mininet( SingleSwitchTopo(), self.switchClass, Host, Controller,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment