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