-
Notifications
You must be signed in to change notification settings - Fork 320
Expand file tree
/
Copy pathtox.ini
More file actions
95 lines (86 loc) · 2.49 KB
/
tox.ini
File metadata and controls
95 lines (86 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[tox]
minversion = 3.7.0
skip_missing_interpreters = true
envlist =
py{27,37,38,py2.7,py3.8}
flake8
integration
mypy
# black - see comments below
[testenv]
passenv =
DD_TEST_CLIENT*
DD_ORIGIN_DETECTION_ENABLED
usedevelop = true
deps =
click
freezegun
mock
pytest
pytest-vcr
python-dateutil
vcrpy
commands =
!integration: pytest -v tests/unit {posargs}
integration: pytest -v tests/integration -m "not admin_needed" {posargs}
[testenv:integration]
# Use skip_install + PYTHONPATH so this env works on Python 3.4 too
# (hatchling can't be built there). Runtime deps normally pulled in by
# the package install must be listed explicitly here.
skip_install = true
setenv = PYTHONPATH = {toxinidir}
deps =
{[testenv]deps}
requests>=2.6.0
typing
configparser<5; python_version < '3.0'
[testenv:integration-admin]
skip_install = true
setenv = PYTHONPATH = {toxinidir}
deps =
{[testenv]deps}
requests>=2.6.0
typing
configparser<5; python_version < '3.0'
commands =
pytest -v tests/integration -m "admin_needed" {posargs}
[testenv:py34]
# hatchling (the build backend in pyproject.toml) cannot be installed on
# Python 3.4 because it transitively requires pluggy>=1.0.0 which has no
# Python-3.4-compatible release. Skip the package install and expose the
# source via PYTHONPATH instead, adding the runtime deps explicitly.
skip_install = true
setenv = PYTHONPATH = {toxinidir}
deps =
{[testenv]deps}
requests>=2.6.0
typing
configparser<5; python_version < '3.0'
[testenv:flake8]
skip_install = true
deps =
flake8==7.1.2
commands = flake8 datadog
# Black isn't safe to run while support is being maintained for python2.7, but
# can be re-enabled when support for 2.7 is dropped.
#
# [testenv:black]
# deps =
# black
# commands = black --line-length 120 {posargs} datadog
[testenv:mypy]
basepython = python3
skip_install = true
deps =
mypy==1.14.1
commands =
mypy --config-file mypy.ini datadog
[flake8]
max-line-length = 120
# E203, W503: formatting disagreements with black
# F401: pyflakes 3.x no longer tracks # type: comment usages, producing false
# positives for all typing imports used only in PEP 484 type comments.
ignore = E203,W503,F401
[pytest]
markers =
admin_needed: marks tests that require the user associated with the application key to have admin rights, or destructive tests for the destination org. Do not run unless you know what you are doing. To run use `tox -e integration-admin`