diff --git a/poetry.lock b/poetry.lock index 3820eda..5fba27b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -200,6 +200,20 @@ pyyaml = ">=5.3.1" requests = ">=2.23.0" rich = "*" +[[package]] +name = "exceptiongroup" +version = "1.2.0" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "idna" version = "3.6" @@ -211,6 +225,17 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + [[package]] name = "jinja2" version = "3.1.3" @@ -332,6 +357,32 @@ files = [ {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, ] +[[package]] +name = "packaging" +version = "23.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "pluggy" +version = "1.3.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, + {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + [[package]] name = "pygments" version = "2.17.2" @@ -347,6 +398,28 @@ files = [ plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] +[[package]] +name = "pytest" +version = "7.4.4" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, + {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + [[package]] name = "python-dateutil" version = "2.8.2" @@ -498,6 +571,17 @@ files = [ {file = "text_unidecode-1.3-py2.py3-none-any.whl", hash = "sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8"}, ] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "types-python-dateutil" version = "2.8.19.20240106" @@ -528,4 +612,4 @@ zstd = ["zstandard (>=0.18.0)"] [metadata] lock-version = "2.0" python-versions = "3.10.*" -content-hash = "62ef5e38f7f338cc84cd2809460e5192ec7d405685cdb65d927023db89c8cb34" +content-hash = "4fca8d814a86cd24aed12b3f2e2462cf484e4bb1b3bb8c0b6a7b920bbc08f2ca" diff --git a/pyproject.toml b/pyproject.toml index 791c97a..1a7d4aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,10 @@ authors = ["mwtmurphy "] python = "3.10.*" cookiecutter = "^2.2.3" +[tool.poetry.group.dev.dependencies] +pytest = "^7.4.4" +click = "^8.1.7" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/{{cookiecutter.directory_name}}/src/{{cookiecutter.package_name}}/main.py b/{{cookiecutter.directory_name}}/src/{{cookiecutter.package_name}}/main.py index ffe5206..d23cb16 100644 --- a/{{cookiecutter.directory_name}}/src/{{cookiecutter.package_name}}/main.py +++ b/{{cookiecutter.directory_name}}/src/{{cookiecutter.package_name}}/main.py @@ -23,6 +23,6 @@ def main(example: int): ''' execution_type = "default" if example == 1 else "custom" - response = f"main execute in mode: {execution_type}" + response = f"main executed in mode: {execution_type}" return response diff --git a/{{cookiecutter.directory_name}}/tests/conftest.py b/{{cookiecutter.directory_name}}/tests/conftest.py new file mode 100644 index 0000000..874dc79 --- /dev/null +++ b/{{cookiecutter.directory_name}}/tests/conftest.py @@ -0,0 +1,4 @@ +# tests/conftest.py + +def pytest_configure(config): + config.addinivalue_line("markers", "e2e: mark as end-to-end test.") \ No newline at end of file diff --git a/{{cookiecutter.directory_name}}/tests/test_main.py b/{{cookiecutter.directory_name}}/tests/test_main.py index 64ecbe4..247c493 100644 --- a/{{cookiecutter.directory_name}}/tests/test_main.py +++ b/{{cookiecutter.directory_name}}/tests/test_main.py @@ -17,7 +17,7 @@ def runner(): return testing.CliRunner() @mark.e2e -def test_main_succeeds(runner: testing.CliRunner, is_caching: bool): +def test_main_succeeds(runner: testing.CliRunner): '''Validates main function executes without failing. Arguments: