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, thehrefandsrcattributes of an HTML tag, and a reference definition,[label]: url.
- tests.test_readme.test_readme_links_and_images_are_absolute()[source]ΒΆ
Every link and image of
readme.mdpoints at an absolute URL.pyproject.tomlsetsreadme = "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: