def METHOD_NAME(self):
    with pytest.raises(
            exceptions.InvalidSyntax,
            match=re.escape(
                r"version string '5.0.0a' does not conform to pattern "
                r"'^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$'")):
        versions.components("5.0.0a")