mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-06-06 14:43:17 +03:00
Move pytest config to pyproject.toml (#876)
* Move pytest config to pyproject.toml * Fix pytest warning
This commit is contained in:
parent
6685c5a141
commit
35bfafdfe2
2
Makefile
2
Makefile
|
@ -36,7 +36,7 @@ uninstall:
|
||||||
test:
|
test:
|
||||||
# Unit tests with coverage report
|
# Unit tests with coverage report
|
||||||
coverage erase
|
coverage erase
|
||||||
coverage run -m pytest -c tests/.configs/pytest.ini
|
coverage run -m pytest
|
||||||
coverage report
|
coverage report
|
||||||
coverage html
|
coverage html
|
||||||
|
|
||||||
|
|
|
@ -99,3 +99,17 @@ ignore = ["tests"]
|
||||||
[tool.pylint.design]
|
[tool.pylint.design]
|
||||||
min-public-methods = 0
|
min-public-methods = 0
|
||||||
max-public-methods = 30
|
max-public-methods = 30
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
testpaths = ["tests/unit/"]
|
||||||
|
asyncio_mode = "auto"
|
||||||
|
markers = [
|
||||||
|
"pydantic: Tests with Pydantic as a dependency",
|
||||||
|
]
|
||||||
|
filterwarnings = [
|
||||||
|
"ignore:Module \"dependency_injector.ext.aiohttp\" is deprecated since version 4\\.0\\.0:DeprecationWarning",
|
||||||
|
"ignore:Module \"dependency_injector.ext.flask\" is deprecated since version 4\\.0\\.0:DeprecationWarning",
|
||||||
|
"ignore:Please use \\`.*?\\` from the \\`scipy.*?\\`(.*?)namespace is deprecated\\.:DeprecationWarning",
|
||||||
|
"ignore:Please import \\`.*?\\` from the \\`scipy(.*?)\\` namespace(.*):DeprecationWarning",
|
||||||
|
"ignore:\\`scipy(.*?)\\` is deprecated(.*):DeprecationWarning",
|
||||||
|
]
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
[pytest]
|
|
||||||
testpaths = tests/unit/
|
|
||||||
python_files = test_*_py3*.py
|
|
||||||
asyncio_mode = auto
|
|
||||||
markers =
|
|
||||||
pydantic: Tests with Pydantic as a dependency
|
|
||||||
filterwarnings =
|
|
||||||
ignore:Module \"dependency_injector.ext.aiohttp\" is deprecated since version 4\.0\.0:DeprecationWarning
|
|
||||||
ignore:Module \"dependency_injector.ext.flask\" is deprecated since version 4\.0\.0:DeprecationWarning
|
|
||||||
ignore:Please use \`.*?\` from the \`scipy.*?\`(.*?)namespace is deprecated\.:DeprecationWarning
|
|
||||||
ignore:Please import \`.*?\` from the \`scipy(.*?)\` namespace(.*):DeprecationWarning
|
|
||||||
ignore:\`scipy(.*?)\` is deprecated(.*):DeprecationWarning
|
|
||||||
ignore:ssl\.PROTOCOL_TLS is deprecated:DeprecationWarning:botocore.*
|
|
|
@ -11,7 +11,7 @@ def index():
|
||||||
return "Hello World!"
|
return "Hello World!"
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def _test():
|
||||||
return "Test!"
|
return "Test!"
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class ApplicationContainer(containers.DeclarativeContainer):
|
||||||
app = flask.Application(Flask, __name__)
|
app = flask.Application(Flask, __name__)
|
||||||
|
|
||||||
index_view = flask.View(index)
|
index_view = flask.View(index)
|
||||||
test_view = flask.View(test)
|
test_view = flask.View(_test)
|
||||||
test_class_view = flask.ClassBasedView(Test)
|
test_class_view = flask.ClassBasedView(Test)
|
||||||
|
|
||||||
|
|
||||||
|
|
8
tox.ini
8
tox.ini
|
@ -19,7 +19,7 @@ deps=
|
||||||
werkzeug
|
werkzeug
|
||||||
extras=
|
extras=
|
||||||
yaml
|
yaml
|
||||||
commands = pytest -c tests/.configs/pytest.ini
|
commands = pytest
|
||||||
python_files = test_*_py3*.py
|
python_files = test_*_py3*.py
|
||||||
setenv =
|
setenv =
|
||||||
COVERAGE_RCFILE = pyproject.toml
|
COVERAGE_RCFILE = pyproject.toml
|
||||||
|
@ -45,7 +45,7 @@ deps =
|
||||||
boto3
|
boto3
|
||||||
mypy_boto3_s3
|
mypy_boto3_s3
|
||||||
werkzeug
|
werkzeug
|
||||||
commands = pytest -c tests/.configs/pytest.ini -m pydantic
|
commands = pytest -m pydantic
|
||||||
|
|
||||||
[testenv:coveralls]
|
[testenv:coveralls]
|
||||||
passenv = GITHUB_*, COVERALLS_*, DEPENDENCY_INJECTOR_*
|
passenv = GITHUB_*, COVERALLS_*, DEPENDENCY_INJECTOR_*
|
||||||
|
@ -57,7 +57,7 @@ deps=
|
||||||
coveralls>=4
|
coveralls>=4
|
||||||
commands=
|
commands=
|
||||||
coverage erase
|
coverage erase
|
||||||
coverage run -m pytest -c tests/.configs/pytest.ini
|
coverage run -m pytest
|
||||||
coverage report
|
coverage report
|
||||||
coveralls
|
coveralls
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ deps=
|
||||||
mypy_boto3_s3
|
mypy_boto3_s3
|
||||||
extras=
|
extras=
|
||||||
yaml
|
yaml
|
||||||
commands = pytest -c tests/.configs/pytest-py35.ini
|
commands = pytest
|
||||||
|
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user