未验证 提交 2c40c13c 编写于 作者: A Amador Pahim

Merge branch 'ldoktor-selftest'

Signed-off-by: NAmador Pahim <apahim@redhat.com>
......@@ -57,9 +57,17 @@ class xUnitSucceedTest(unittest.TestCase):
self.junit = os.path.abspath(junit_xsd)
def tearDown(self):
os.close(self.tmpfile[0])
os.remove(self.tmpfile[1])
shutil.rmtree(self.tmpdir)
errs = []
cleanups = (lambda: os.close(self.tmpfile[0]),
lambda: os.remove(self.tmpfile[1]),
lambda: shutil.rmtree(self.tmpdir))
for cleanup in cleanups:
try:
cleanup()
except Exception as exc:
errs.append(str(exc))
self.assertFalse(errs, "Failures occurred during cleanup:\n%s"
% "\n".join(errs))
@unittest.skipUnless(SCHEMA_CAPABLE,
'Unable to validate schema due to missing lxml.etree library')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册