def test_set_version_invalid_input_raises_validation_error():
    """
    If something not interpretable as valid version string is passed to set_version, a ValidationError is raised.
    """
    metadata = MetaData(version="0.8.1.5")
    with pytest.raises(exceptions.ValidationError):
        metadata.set_version("this is not a valid version string")
def test_set_version_valid_input_overwrites_version():
    """
    It is possible to overwrite the initially set version.
    """
    metadata = MetaData(version="0.8.1.5")
    metadata.set_version("4.7.1.1")
    assert metadata.version == "4.7.1.1"