Skip to content

Commit

Permalink
chore(pytest): move config to setup.cfg (DataDog#3586)
Browse files Browse the repository at this point in the history
* chore(pytest): move config to setup.cfg

tox.ini is an odd place for it

* apparently have to use tool:pytest section
  • Loading branch information
Kyle-Verhoog authored Apr 15, 2022
1 parent 01ffe52 commit dc6ec51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
16 changes: 16 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,19 @@ ignore = W503,E231,A003,G201,D100,D101,D102,D103,D104,D105,D106,D107,D200,D202,D
enable-extensions=G
rst-roles = class,meth,obj,ref,func
rst-directives = py:data

# DEV: We use `conftest.py` as a local pytest plugin to configure hooks for collection
[tool:pytest]
# --cov-report is intentionally empty else pytest-cov will default to generating a report
addopts =
--cov=ddtrace/
--cov=tests/
--cov-append
--cov-report=
--durations=10
--junitxml=test-results/junit.xml
# DEV: The default is `test_*\.py` which will miss `test.py` files
python_files = test*\.py
filterwarnings =
# Show any DeprecationWarnings once
once::DeprecationWarning
10 changes: 0 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,3 @@ deps=

# this is somewhat flaky (can fail and still be up) so try the tests anyway
ignore_outcome=true

# DEV: We use `conftest.py` as a local pytest plugin to configure hooks for collection
[pytest]
# --cov-report is intentionally empty else pytest-cov will default to generating a report
addopts = --cov=ddtrace/ --cov=tests/ --cov-append --cov-report= --durations=10 --junitxml=test-results/junit.xml
# DEV: The default is `test_*\.py` which will miss `test.py` files
python_files = test*\.py
filterwarnings =
# Show any DeprecationWarnings once
once::DeprecationWarning

0 comments on commit dc6ec51

Please sign in to comment.