Fix test_version without cssutils

This commit is contained in:
Florian Bruhin 2018-03-05 11:36:50 +01:00
parent 2f8686ec70
commit 67b4502fdb

View File

@ -648,6 +648,8 @@ class TestModuleVersions:
name: The name of the module to check.
has_version: Whether a __version__ attribute is expected.
"""
if name == 'cssutils':
pytest.importorskip(name)
module = importlib.import_module(name)
assert hasattr(module, '__version__') == has_version