Skip to content

Commit

Permalink
Add rudimentary cookiecutter test
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed Nov 5, 2023
1 parent 13d9fd2 commit b324a1e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pdoc = [
]
test = [
"pytest~=7.4",
"pytest-cookies~=0.7.0",
"pytest-dependency~=0.5.1",
"syrupy~=4.6",
]
Expand Down Expand Up @@ -158,7 +159,6 @@ reportInvalidStubStatement = "error"
reportInvalidTypeVarUse = "error"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeStubs = "error"
reportOverlappingOverload = "error"
reportSelfClsParameterName = "error"
reportTypeCommentUsage = "error"
Expand All @@ -185,3 +185,5 @@ reportUnusedExpression = "warning"
reportUnusedFunction = "warning"
reportUnusedImport = "warning"
reportUnusedVariable = "warning"

reportMissingTypeStubs = "none"
21 changes: 21 additions & 0 deletions test/test_cookiecutter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# pyright: reportUnknownMemberType=false

from pytest import MonkeyPatch
from pytest_cookies.plugin import Cookies


def test_cookiecutter(cookies: Cookies, monkeypatch: MonkeyPatch):
result = cookies.bake(
{
"output_directory": "output",
"modid": "mod",
"pattern_regex": "hex_latest",
}
)

assert result.exception is None
assert result.project_path is not None

monkeypatch.syspath_prepend(result.project_path / "doc" / "src")

import hexdoc_mod # type: ignore

0 comments on commit b324a1e

Please sign in to comment.