tests.test_readme moduleΒΆ

Tests for readme.md, which ships to PyPI as the long description.

tests.test_readme.URL_RE = re.compile('\\]\\((?P<markdown>[^)\\s]+)|\\s(?:href|src)=["\'](?P<html>[^"\']+)["\']|^\\[[^\\]]+\\]:\\s*(?P<definition>\\S+)', re.MULTILINE)ΒΆ

Target of every link and image in a Markdown file.

Matches the inline Markdown forms, `text <url>`_ and ![alt](url), the href and src attributes of an HTML tag, and a reference definition, [label]: url.

Every link and image of readme.md points at an absolute URL.

pyproject.toml sets readme = "readme.md", so this file ships verbatim as the PyPI long description. GitHub resolves a relative target against the repository. PyPI has no repository to resolve it against, so the image breaks or the link goes nowhere, on the published project page alone.

Return type:

None