Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import {{package_name}}

def test_version():
"""Check to see that we can get the package version"""
assert {{package_name}}.__version__ is not None
assert {{package_name}}.__version__ is not None
22 changes: 17 additions & 5 deletions tests/test_package_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ def create_project_with_basic_checks(copie, extra_answers, package_name="example
print("Required file not generated:", file)
assert all_found

# black_runs_successfully
# black_runs_successfully for src and tests
black_results = subprocess.run(
["python", "-m", "black", "--check", (result.project_dir / "src")],
["python", "-m", "black", "--check", "--verbose", result.project_dir],
cwd=result.project_dir,
check=False,
)

assert black_results.returncode == 0

return result
Expand All @@ -69,7 +68,7 @@ def create_project_with_basic_checks(copie, extra_answers, package_name="example
def pylint_runs_successfully(result):
"""Test to ensure that the pylint linter runs successfully on the project"""
# run pylint to ensure that the hydrated files are linted correctly
pylint_results = subprocess.run(
pylint_src_results = subprocess.run(
[
"python",
"-m",
Expand All @@ -82,7 +81,20 @@ def pylint_runs_successfully(result):
check=False,
)

return pylint_results.returncode == 0
pylint_test_results = subprocess.run(
[
"python",
"-m",
"pylint",
"--recursive=y",
"--rcfile=./tests/.pylintrc",
(result.project_dir / "tests"),
],
cwd=result.project_dir,
check=False,
)

return pylint_src_results.returncode == 0 and pylint_test_results.returncode == 0


def docs_build_successfully(result):
Expand Down