Stop using tearDown.
TestCase.tearDown doesn't get called if setUp fails, it should never be used. Change-Id: Ib960c3f9610d8d8a0624e0c0709afa819e1858ad
This commit is contained in:
parent
1897ecf001
commit
f20f9954db
@ -46,10 +46,7 @@ class TestCollect(testtools.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestCollect, self).setUp()
|
super(TestCollect, self).setUp()
|
||||||
self.useFixture(fixtures.FakeLogger())
|
self.useFixture(fixtures.FakeLogger())
|
||||||
|
self.addCleanup(cfg.CONF.reset)
|
||||||
def tearDown(self):
|
|
||||||
super(TestCollect, self).tearDown()
|
|
||||||
cfg.CONF.reset()
|
|
||||||
|
|
||||||
def _call_main(self, fake_args):
|
def _call_main(self, fake_args):
|
||||||
# make sure we don't run forever!
|
# make sure we don't run forever!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user