提交 e8792976 编写于 作者: L Lukáš Doktor

selftest.unit.test_test: Teardown the flexmock

We're substituting `os.path` with flexmock, let's not forget to clean-up
properly.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 03a90024
...@@ -2,7 +2,7 @@ import os ...@@ -2,7 +2,7 @@ import os
import shutil import shutil
import sys import sys
import tempfile import tempfile
from flexmock import flexmock from flexmock import flexmock, flexmock_teardown
if sys.version_info[:2] == (2, 6): if sys.version_info[:2] == (2, 6):
import unittest2 as unittest import unittest2 as unittest
...@@ -32,6 +32,7 @@ class TestClassTestUnit(unittest.TestCase): ...@@ -32,6 +32,7 @@ class TestClassTestUnit(unittest.TestCase):
self.tmpdir = tempfile.mkdtemp(prefix="avocado_" + __name__) self.tmpdir = tempfile.mkdtemp(prefix="avocado_" + __name__)
def tearDown(self): def tearDown(self):
flexmock_teardown()
shutil.rmtree(self.tmpdir) shutil.rmtree(self.tmpdir)
def testUglyName(self): def testUglyName(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册