提交 f51b926f 编写于 作者: C Cleber Rosa

selftests/functional/test_basic.py: skip tests on missing lxml library

This is similar to the xunit unittest changes in 353fed04, but now
applied to the functional tests which happen to use the same features.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 fd758fe8
......@@ -20,7 +20,12 @@ try:
except:
from BytesIO import BytesIO
from lxml import etree
try:
from lxml import etree
SCHEMA_CAPABLE = True
except ImportError:
SCHEMA_CAPABLE = False
from six import iteritems
from six.moves import xrange as range
......@@ -1144,6 +1149,8 @@ class ParseXMLError(Exception):
class PluginsXunitTest(AbsPluginsTest, unittest.TestCase):
@unittest.skipUnless(SCHEMA_CAPABLE,
'Unable to validate schema due to missing lxml.etree library')
def setUp(self):
self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__)
junit_xsd = os.path.join(os.path.dirname(__file__),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册