mirror of
https://github.com/copier-org/copier.git
synced 2025-05-30 11:31:19 +00:00
19 lines
513 B
Python
19 lines
513 B
Python
from pathlib import Path
|
|
|
|
from ..copier import tools
|
|
|
|
from .helpers import PROJECT_TEMPLATE, DATA
|
|
|
|
|
|
def test_render(dst):
|
|
render = tools.get_jinja_renderer(PROJECT_TEMPLATE, DATA)
|
|
|
|
assert render.string("/hello/[[ what ]]/") == "/hello/world/"
|
|
assert render.string("/hello/world/") == "/hello/world/"
|
|
|
|
sourcepath = PROJECT_TEMPLATE / "pyproject.toml.tmpl"
|
|
result = render(sourcepath)
|
|
expected = Path("./tests/pyproject.toml.ref").read_text()
|
|
print(result)
|
|
assert result == expected
|