+test_update_rst_readme()

pull/6/head
JensDiemer 2020-10-17 21:30:19 +02:00
rodzic dff0910bbe
commit f850e1ec91
3 zmienionych plików z 24 dodań i 10 usunięć

Wyświetl plik

@ -3,6 +3,8 @@ import shutil
import subprocess
from pathlib import Path
from creole.setup_utils import update_rst_readme
import inventory
@ -58,3 +60,14 @@ def test_poetry_check(package_root=None):
)
print(output)
assert output == 'All set!\n'
def test_update_rst_readme(capsys):
rest_readme_path = update_rst_readme(
package_root=PACKAGE_ROOT, filename='README.creole'
)
captured = capsys.readouterr()
assert captured.out == 'Generate README.rst from README.creole...nothing changed, ok.\n'
assert captured.err == ''
assert isinstance(rest_readme_path, Path)
assert str(rest_readme_path).endswith('/README.rst')

20
poetry.lock wygenerowano
Wyświetl plik

@ -76,7 +76,7 @@ django = "*"
name = "certifi"
version = "2020.6.20"
description = "Python package for providing Mozilla's CA Bundle."
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -95,7 +95,7 @@ pycparser = "*"
name = "chardet"
version = "3.0.4"
description = "Universal encoding detector for Python 2 and 3"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@ -396,7 +396,7 @@ python-versions = "*"
name = "idna"
version = "2.10"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "dev"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
@ -684,11 +684,11 @@ pytest = "*"
[[package]]
name = "python-creole"
version = "1.4.6"
version = "1.4.7"
description = "python-creole is an open-source (GPL) markup converter in pure Python for: creole2html, html2creole, html2ReSt, html2textile"
category = "dev"
optional = false
python-versions = ">=3.6,<4.0"
python-versions = ">=3.6,<4.0.0"
[package.dependencies]
docutils = "*"
@ -749,7 +749,7 @@ md = ["cmarkgfm (>=0.2.0)"]
name = "requests"
version = "2.24.0"
description = "Python HTTP for Humans."
category = "dev"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
@ -912,7 +912,7 @@ tqdm = ">=4.14"
name = "urllib3"
version = "1.25.10"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "dev"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
@ -979,7 +979,7 @@ testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pyt
[metadata]
lock-version = "1.1"
python-versions = ">=3.7,<4.0.0"
content-hash = "d164a00462dfbb50f85ba6882679350cdfc82ff65e48a0d5d2b0fda6068a4b30"
content-hash = "1d04353be2d22444baeac57568ab372c021a7735bd893245887a8a342589f19f"
[metadata.files]
appdirs = [
@ -1308,8 +1308,8 @@ pytest-randomly = [
{file = "pytest_randomly-3.4.1-py3-none-any.whl", hash = "sha256:2c4df1390db72a33a4f44fac0c780e7883cd5968238efa2a2bdbdd54e3fc6681"},
]
python-creole = [
{file = "python-creole-1.4.6.tar.gz", hash = "sha256:7e568876b7bfc9b9637eaa3d278fb4e3af896632800b2d068d2c27ee831c2678"},
{file = "python_creole-1.4.6-py3-none-any.whl", hash = "sha256:ad8bc005bbe7efd91cf37c4227365f456fd593af76b2b04cdce1704fcf36a368"},
{file = "python-creole-1.4.7.tar.gz", hash = "sha256:eb27bc3f31a4dcd896ab47098c283fed738993be1c1d91b3e33cbdf31e85910d"},
{file = "python_creole-1.4.7-py3-none-any.whl", hash = "sha256:9f7c59b16a07cd26de971b5bc6e648e4ce8f60c926f0d65ef33b3f819cc04b6e"},
]
pytz = [
{file = "pytz-2020.1-py2.py3-none-any.whl", hash = "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed"},

Wyświetl plik

@ -55,6 +55,7 @@ requests = "*" # https://github.com/psf/requests
[tool.poetry.dev-dependencies]
poetry-publish = "*" # https://github.com/jedie/poetry-publish
python-creole = "*" # https://github.com/jedie/python-creole
tox = "*"
pytest = "*"
pytest-randomly = "*"