'Check if all dependencies have an expected __version__ attribute.
The aim of this test is to fail if modules suddenly don\'t have a
__version__ attribute anymore in a newer version.
Args:
name: The name of the module to check.
has_version: Whether a __version__ attribute is expected.'

@pytest.mark.parametrize('name,    has_version', [('sip', False), ('colorama', True), ('pypeg2', True), ('jinja2', True), ('pygments', True), ('yaml', True), ('cssutils', True)])
def test_existing_attributes(self, name, has_version):

    module = importlib.import_module(name)
    assert (hasattr(module, '__version__') == has_version)
