From d76e599be06eb2d9645a9472b15b9d5435fc2843 Mon Sep 17 00:00:00 2001 From: Emily Bicks Date: Wed, 26 Oct 2022 10:34:50 +0100 Subject: [PATCH 1/2] adding tests folder with template file --- {{ cookiecutter.repo_name }}/tests/test_TEMPLATE.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 {{ cookiecutter.repo_name }}/tests/test_TEMPLATE.py diff --git a/{{ cookiecutter.repo_name }}/tests/test_TEMPLATE.py b/{{ cookiecutter.repo_name }}/tests/test_TEMPLATE.py new file mode 100644 index 00000000..5871ed8e --- /dev/null +++ b/{{ cookiecutter.repo_name }}/tests/test_TEMPLATE.py @@ -0,0 +1 @@ +import pytest From 5407c255e990688fbdc686329a496acf2d6dce58 Mon Sep 17 00:00:00 2001 From: Emily Bicks Date: Tue, 22 Nov 2022 14:51:17 +0000 Subject: [PATCH 2/2] adding pycache to ignored list in test creation --- tests/test_creation.py | 3 ++- {{ cookiecutter.repo_name }}/.gitignore | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_creation.py b/tests/test_creation.py index 13684325..ee5abdde 100644 --- a/tests/test_creation.py +++ b/tests/test_creation.py @@ -113,6 +113,7 @@ def test_folders(self): ".cookiecutter/state", ".recipes", "docs", + "tests", "inputs", "inputs/data", "outputs", @@ -139,7 +140,7 @@ def test_folders(self): lambda dir: not any( ( re.match(f".*{stub}", dir) - for stub in [".git/", ".vscode", ".pytest_cache"] + for stub in [".git/", ".vscode", ".pytest_cache", "__pycache__"] ) ), abs_dirs, diff --git a/{{ cookiecutter.repo_name }}/.gitignore b/{{ cookiecutter.repo_name }}/.gitignore index 50145824..b79521ea 100644 --- a/{{ cookiecutter.repo_name }}/.gitignore +++ b/{{ cookiecutter.repo_name }}/.gitignore @@ -124,3 +124,8 @@ target/ # NPM node_modules/ + +# test cache +.cache/* +tests/__pycache__/* +*.pytest_cache/