Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
167 lines (156 sloc) 5.07 KB
{%- if cookiecutter.c_extension_support == "no" -%}
[bdist_wheel]
universal = 1
{% endif -%}
{%- if cookiecutter.linter == "flake8" -%}
[flake8]
max-line-length = 140
exclude = .tox,.eggs,ci/templates,build,dist
{%- else -%}
[pylama]
format = pylint
skip = .tox/*,.eggs/*,ci/templates/*,build/*,dist/*
[pylama:pycodestyle]
max_line_length = 140
{%- endif %}
{%- if cookiecutter.setup_py_uses_test_runner == 'yes' %}
[options]
# tests_require is a list of dependencies that are *absolutely required*
# to run the tests. tests_require is used when running tests from your
# *current* Python environment (that is, not using tox).
# tests_require is ignored by tox.
#
# As such, you can usually get away with neglecting tests_require ---
# it's not a big deal if some of the dependencies get left out.
#
# If you're running tests from your current environment, it's because
# you're actively developing, in which case you usually have an
# environment you built for development. But if you have to change
# environments mid-development for any reason, tests_require can save you
# from getting tripped up.
#
# tests_require is used when running tests and debugging through an IDE like
# PyCharm, to ensure the environment the IDE is using has the requirements.
#
# Unless you're in one of those situations, you can simply ignore this.
tests_require = {{ cookiecutter.test_runner }}
[aliases]
# Alias `setup.py test` to `setup.py {{ cookiecutter.test_runner }}`
test = {{ cookiecutter.test_runner }}
{%- endif %}
{%- if cookiecutter.test_runner == "pytest" %}
[tool:pytest]
# If a pytest section is found in one of the possible config files
# (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others,
# so if you add a pytest config section elsewhere,
# you will need to delete this section from setup.cfg.
{%- if cookiecutter.test_matrix_separate_coverage == 'yes' %}
norecursedirs =
.git
.tox
.env
dist
build
migrations
{% else %}
norecursedirs =
migrations
{% endif %}
python_files =
test_*.py
*_test.py
tests.py
addopts =
-ra
--strict
{%- if cookiecutter.test_matrix_separate_coverage == 'yes' %}
--ignore=docs/conf.py
--ignore=setup.py
--ignore=ci
--ignore=.eggs
{%- endif %}
--doctest-modules
--doctest-glob=\*.rst
--tb=short
{%- if cookiecutter.allow_tests_inside_package == 'yes' %}
--pyargs
# The order of these options matters. testpaths comes after addopts so that
# {{cookiecutter.package_name}} in testpaths is interpreted as
# --pyargs {{cookiecutter.package_name}}.
# Any tests in the src/ directory (that is, tests installed with the package)
# can be run by any user with pytest --pyargs {{cookiecutter.package_name}}.
# Packages that are sensitive to the host machine, most famously NumPy,
# include tests with the installed package so that any user can check
# at any time that everything is working properly.
# If you do choose to make installable tests, this will run the installed
# tests as they are actually installed (same principle as when we ensure that
# we always test the installed version of the package).
# If you have no need for this (and your src/ directory is very large),
# you can save a few milliseconds on testing by telling pytest not to search
# the src/ directory by removing
# --pyargs and {{cookiecutter.package_name}} from the options here.
testpaths =
{{cookiecutter.package_name}}
tests/
{%- else %}
testpaths =
tests
{%- endif %}
{% elif cookiecutter.test_runner == "nose" -%}
[nosetests]
verbosity = 2
{% endif -%}
[tool:isort]
force_single_line = True
line_length = 120
known_first_party = {{ cookiecutter.package_name }}
default_section = THIRDPARTY
forced_separate = test_{{ cookiecutter.package_name }}
skip = .tox,.eggs,ci/templates,build,dist
{% if cookiecutter.test_matrix_configurator == "yes" %}
[matrix]
# This is the configuration for the `./bootstrap.py` script.
# It generates `.travis.yml`, `tox.ini` and `.appveyor.yml`.
#
# Syntax: [alias:] value [!variable[glob]] [&variable[glob]]
#
# alias:
# - is used to generate the tox environment
# - it's optional
# - if not present the alias will be computed from the `value`
# value:
# - a value of "-" means empty
# !variable[glob]:
# - exclude the combination of the current `value` with
# any value matching the `glob` in `variable`
# - can use as many you want
# &variable[glob]:
# - only include the combination of the current `value`
# when there's a value matching `glob` in `variable`
# - can use as many you want
python_versions =
{%- if cookiecutter.legacy_python == "yes" %}
py27
{%- endif %}
py36
py37
py38
py39
{%- if cookiecutter.legacy_python == "yes" %}
pypy
{%- endif %}
pypy3
dependencies =
# 1.4: Django==1.4.16 !python_versions[py3*]
# 1.5: Django==1.5.11
# 1.6: Django==1.6.8
# 1.7: Django==1.7.1 !python_versions[py26]
# Deps commented above are provided as examples. That's what you would use in a Django project.
{% if cookiecutter.test_matrix_separate_coverage == 'yes' -%}
coverage_flags =
cover: true
nocov: false
{% endif -%}
environment_variables =
-
{% endif -%}