kopia lustrzana https://github.com/jedie/PyInventory
move pytest.ini into pyproject.toml
rodzic
45f53541a9
commit
c4c63d8e18
|
@ -88,11 +88,44 @@ publish = "inventory_project.publish:publish"
|
||||||
requires = ["poetry>=0.12"]
|
requires = ["poetry>=0.12"]
|
||||||
build-backend = "poetry.masonry.api"
|
build-backend = "poetry.masonry.api"
|
||||||
|
|
||||||
|
|
||||||
[tool.autopep8]
|
[tool.autopep8]
|
||||||
# https://github.com/hhatto/autopep8#pyprojecttoml
|
# https://github.com/hhatto/autopep8#pyprojecttoml
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
exclude = "*/migrations/*"
|
exclude = "*/migrations/*"
|
||||||
|
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
|
||||||
|
minversion = "6.0"
|
||||||
|
DJANGO_SETTINGS_MODULE="inventory_project.settings.tests"
|
||||||
|
norecursedirs = ".* .git __pycache__ coverage* dist"
|
||||||
|
# sometimes helpfull "addopts" arguments:
|
||||||
|
# -vv
|
||||||
|
# --verbose
|
||||||
|
# --capture=no
|
||||||
|
# --trace-config
|
||||||
|
# --full-trace
|
||||||
|
# -p no:warnings
|
||||||
|
addopts = """
|
||||||
|
--import-mode=importlib
|
||||||
|
--ignore-glob=deployment/inventory/*
|
||||||
|
--reuse-db
|
||||||
|
--nomigrations
|
||||||
|
--cov=.
|
||||||
|
--cov-report term-missing
|
||||||
|
--cov-report html
|
||||||
|
--cov-report xml
|
||||||
|
--no-cov-on-fail
|
||||||
|
--showlocals
|
||||||
|
--doctest-modules
|
||||||
|
--failed-first
|
||||||
|
--last-failed-no-failures all
|
||||||
|
--new-first
|
||||||
|
-p no:randomly
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
[tool.tox]
|
[tool.tox]
|
||||||
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
|
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
|
||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
|
|
47
pytest.ini
47
pytest.ini
|
@ -1,47 +0,0 @@
|
||||||
#
|
|
||||||
# http://doc.pytest.org/en/latest/customize.html#builtin-configuration-file-options
|
|
||||||
# https://pytest-django.readthedocs.io/en/latest/
|
|
||||||
|
|
||||||
[pytest]
|
|
||||||
DJANGO_SETTINGS_MODULE=inventory_project.settings.tests
|
|
||||||
|
|
||||||
# http://doc.pytest.org/en/latest/customize.html#confval-norecursedirs
|
|
||||||
norecursedirs = .* .git __pycache__ coverage* dist
|
|
||||||
addopts =
|
|
||||||
--import-mode=importlib
|
|
||||||
--ignore-glob=deployment/inventory/*
|
|
||||||
--collect-in-virtualenv
|
|
||||||
|
|
||||||
--reuse-db
|
|
||||||
--nomigrations
|
|
||||||
|
|
||||||
# coverage:
|
|
||||||
--cov=.
|
|
||||||
--cov-report term-missing
|
|
||||||
--cov-report html
|
|
||||||
--cov-report xml
|
|
||||||
--no-cov-on-fail
|
|
||||||
|
|
||||||
--showlocals
|
|
||||||
|
|
||||||
--doctest-modules
|
|
||||||
|
|
||||||
# run the last failures first:
|
|
||||||
--failed-first
|
|
||||||
|
|
||||||
# run all tests if no tests failed in the last run:
|
|
||||||
--last-failed-no-failures all
|
|
||||||
|
|
||||||
# sort new tests first:
|
|
||||||
--new-first
|
|
||||||
|
|
||||||
# randomly is sometimes helpfull, comment this:
|
|
||||||
-p no:randomly
|
|
||||||
|
|
||||||
# sometimes helpfull:
|
|
||||||
#-vv
|
|
||||||
#--verbose
|
|
||||||
#--capture=no
|
|
||||||
#--trace-config
|
|
||||||
#--full-trace
|
|
||||||
#-p no:warnings
|
|
Ładowanie…
Reference in New Issue