diff --git a/{{cookiecutter.repo_name}}/setup.cfg b/{{cookiecutter.repo_name}}/setup.cfg index 7c98e7a0..53985487 100644 --- a/{{cookiecutter.repo_name}}/setup.cfg +++ b/{{cookiecutter.repo_name}}/setup.cfg @@ -7,6 +7,7 @@ universal = 1 max-line-length = 140 exclude = tests/*,*/migrations/*,*/south_migrations/* +{% if cookiecutter.test_runner|lower == "pytest" -%} [pytest] norecursedirs = .git @@ -33,6 +34,14 @@ addopts = --doctest-glob=\*.rst --tb=short +{%- elif cookiecutter.test_runner|lower == "nose" -%} +[nosetests] +verbosity = 2 +with-coverage = 1 +cover-package = {{ cookiecutter.package_name|replace('-', '_') }} +where = tests/ + +{% endif -%} [isort] force_single_line=True line_length=120 diff --git a/{{cookiecutter.repo_name}}/tox.ini b/{{cookiecutter.repo_name}}/tox.ini index 199c1800..f4c39104 100644 --- a/{{cookiecutter.repo_name}}/tox.ini +++ b/{{cookiecutter.repo_name}}/tox.ini @@ -65,10 +65,10 @@ commands = {%- endif %} {%- else %} {%- if cookiecutter.test_matrix_separate_coverage|lower == 'yes' %} - nocov: {posargs:nosetests -v tests} + nocov: {posargs:nosetests -v} cover: {posargs:nosetests --with-coverage --cover-package={{ cookiecutter.package_name|replace('-', '_') }}} {%- else %} - {posargs:nosetests --with-coverage --cover-package={{ cookiecutter.package_name|replace('-', '_')}} tests} + {posargs:nosetests --with-coverage --cover-package={{ cookiecutter.package_name|replace('-', '_')}}} {%- endif %} {%- endif %}