Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/create-python-app-core/tests/test_create_python_app.py
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
from pathlib import Path

import pytest

from create_python_app_core import create_python_app


@pytest.mark.asyncio
async def test_create_python_app_file_template(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
monkeypatch.setenv("CPA_SKIP_GIT", "1")
root = tmp_path / "tpl"
(root / "template").mkdir(parents=True)
(root / "template" / "x.txt").write_text("ok")
dest = tmp_path / "out"
await create_python_app(
str(dest),
{"template": f"file://{root}", "install": False},
)
assert (dest / "x.txt").read_text() == "ok"