|
1 | 1 | [tox]
|
| 2 | +skip_missing_interpreters = True |
2 | 3 | envlist =
|
3 |
| - py{27,34,35,36,37,38,39}-default |
4 |
| - py{35,36,37,38,39}-aiohttp2 |
5 |
| - py{35,36,37,38,39}-django22 |
6 |
| - py{36,37,38,39}-django30 |
7 |
| - py{36,37,38,39}-django31 |
8 |
| - py{36,37,38,39}-django32 |
9 |
| - py{27,36,37,38,39}-sqlalchemy |
10 |
| - py{34,35}-sqlalchemy |
11 |
| - coverage-report |
| 4 | + py{27,34,35,36,37,38,39}-core |
12 | 5 |
|
13 |
| -skip_missing_interpreters = True |
| 6 | + ; Unavailable for python 2.7 & 3.4 |
| 7 | + py{35,36,37,38,39}-ext-aiobotocore |
| 8 | + |
| 9 | + ; Unavailable for python 2.7 & 3.4 |
| 10 | + py{35,36,37,38,39}-ext-aiohttp |
| 11 | + |
| 12 | + py{27,34,35,36,37,38,39}-ext-botocore |
| 13 | + |
| 14 | + py{27,34,35,36,37,38,39}-ext-bottle |
| 15 | + |
| 16 | + ; Django2 (2.2+) is only for python 3.5 + |
| 17 | + py{35,36,37,38,39}-ext-django-2 |
| 18 | + |
| 19 | + ; Django3 is only for python 3.6+ |
| 20 | + py{36,37,38,39}-ext-django-3 |
| 21 | + |
| 22 | + py{27,34,35,36,37,38,39}-ext-flask |
| 23 | + |
| 24 | + py{27,34,35,36,37,38,39}-ext-flask_sqlalchemy |
| 25 | + |
| 26 | + py{27,34,35,36,37,38,39}-ext-httplib |
| 27 | + |
| 28 | + py{27,34,35,36,37,38,39}-ext-pg8000 |
| 29 | + |
| 30 | + py{27,34,35,36,37,38,39}-ext-psycopg2 |
| 31 | + |
| 32 | + py{27,34,35,36,37,38,39}-ext-pymysql |
| 33 | + |
| 34 | + py{27,34,35,36,37,38,39}-ext-pynamodb |
| 35 | + |
| 36 | + py{27,34,35,36,37,38,39}-ext-requests |
| 37 | + |
| 38 | + py{27,34,35,36,37,38,39}-ext-sqlalchemy |
| 39 | + |
| 40 | + py{27,34,35,36,37,38,39}-ext-sqlalchemy_core |
| 41 | + |
| 42 | + py{27,34,35,36,37,38,39}-ext-sqlite3 |
14 | 43 |
|
15 | 44 | [testenv]
|
16 |
| -passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_* |
| 45 | +passenv = TOXENV CI CODECOV_* |
| 46 | + |
17 | 47 | deps =
|
| 48 | + ; Testing packages |
18 | 49 | pytest > 3.0.0
|
19 | 50 | pytest-benchmark
|
20 |
| - coverage==4.5.4 |
| 51 | + coverage == 4.5.4 |
21 | 52 | codecov
|
22 |
| - requests |
23 |
| - bottle >= 0.10 |
24 |
| - flask >= 0.10 |
25 |
| - sqlalchemy |
26 |
| - Flask-SQLAlchemy |
| 53 | + |
| 54 | + ; Packages common to all test environments |
27 | 55 | future
|
28 |
| - django22: Django==2.2.* |
29 |
| - django30: Django==3.0.* |
30 |
| - django31: Django==3.1.* |
31 |
| - django32: Django==3.2.* |
32 |
| - django{22,30,31,32}: django-fake-model |
33 |
| - pynamodb >= 3.3.1 |
34 |
| - psycopg2 |
35 |
| - pg8000 |
36 |
| - testing.postgresql |
37 |
| - testing.mysqld |
38 |
| - webtest |
39 |
| - # Python2 only deps |
40 |
| - py{27}: enum34 mock |
41 |
| - |
42 |
| - # pymysql deps |
43 |
| - py{27,34,35}: pymysql < 1.0.0 |
44 |
| - py{36,37,38,39}: pymysql >= 1.0.0 |
45 |
| - |
46 |
| - # Python3.4 only deps |
| 56 | + wrapt |
| 57 | + |
| 58 | + ; Python 2.7 only deps |
| 59 | + py{27}: enum34 |
| 60 | + py{27}: mock |
| 61 | + |
| 62 | + ; Python 3.4 only deps |
47 | 63 | py34: typing >= 3.7.4.3
|
48 | 64 |
|
49 |
| - # Python3.5+ only deps |
50 |
| - py{35,36,37,38,39}: aiohttp >= 3.0.0 |
| 65 | + ; Python 3.5+ only deps |
| 66 | + ; for some reason pytest-aiohttp is required for "core" tests |
| 67 | + ; TODO: find and replace by more direct dependency |
51 | 68 | py{35,36,37,38,39}: pytest-aiohttp
|
52 |
| - py{35,36,37,38,39}: aiobotocore >= 0.10.0 |
53 | 69 |
|
54 |
| -commands = |
55 |
| - coverage erase |
56 |
| - py{27,34}-default: coverage run --append --source aws_xray_sdk -m py.test tests --ignore tests/ext/aiohttp --ignore tests/ext/aiobotocore --ignore tests/ext/django --ignore tests/test_async_local_storage.py --ignore tests/test_async_recorder.py --ignore tests/ext/sqlalchemy_core |
57 |
| - py{35,36,37,38,39}-default: coverage run --append --source aws_xray_sdk -m py.test tests --ignore tests/ext/django --ignore tests/ext/sqlalchemy_core |
58 |
| - py{27,36,37,38,39}-default: coverage run --append --source aws_xray_sdk -m py.test tests/ext/sqlalchemy_core |
59 |
| - py{34,35}-default: coverage run --append --source aws_xray_sdk -m py.test tests/ext/sqlalchemy_core/ --ignore tests/ext/sqlalchemy_core/test_sqlalchemy_core_2.py |
60 |
| - django{22,30,31,32}: coverage run --append --source aws_xray_sdk -m py.test tests/ext/django |
61 |
| - codecov |
| 70 | + ext-aiobotocore: aiobotocore >= 0.10.0 |
| 71 | + ext-aiobotocore: pytest-aiohttp |
| 72 | + |
| 73 | + ext-aiohttp: aiohttp >= 3.0.0 |
| 74 | + ; Breaking change where the `test_client` fixture was renamed. |
| 75 | + ; Also, the stable version is only supported for Python 3.7+ |
| 76 | + ext-aiohttp: pytest-aiohttp < 1.0.0 |
| 77 | + |
| 78 | + ext-requests: requests |
| 79 | + |
| 80 | + ext-bottle: bottle >= 0.10 |
| 81 | + ext-bottle: webtest |
| 82 | + |
| 83 | + ext-flask: flask >= 0.10 |
| 84 | + |
| 85 | + ext-flask_sqlalchemy: flask >= 0.10 |
| 86 | + ext-flask_sqlalchemy: Flask-SQLAlchemy |
| 87 | + |
| 88 | + ext-sqlalchemy: sqlalchemy |
| 89 | + |
| 90 | + ext-sqlalchemy_core: sqlalchemy |
| 91 | + ext-sqlalchemy_core: testing.postgresql |
| 92 | + ext-sqlalchemy_core: psycopg2 |
| 93 | + |
| 94 | + ext-django-2: Django >=2.0,<3.0 |
| 95 | + ext-django-3: Django >=3.0,<4.0 |
| 96 | + ext-django: django-fake-model |
| 97 | + |
| 98 | + ext-pynamodb: pynamodb >= 3.3.1 |
| 99 | + |
| 100 | + ext-psycopg2: psycopg2 |
| 101 | + ext-psycopg2: testing.postgresql |
| 102 | + |
| 103 | + ext-pg8000: pg8000 <= 1.20.0 |
| 104 | + ext-pg8000: testing.postgresql |
| 105 | + |
| 106 | + ext-pymysql: testing.mysqld |
| 107 | + py{27,34,35}-ext-pymysql: pymysql < 1.0.0 |
| 108 | + py{36,37,38,39}-ext-pymysql: pymysql >= 1.0.0 |
62 | 109 |
|
63 | 110 | setenv =
|
64 | 111 | DJANGO_SETTINGS_MODULE = tests.ext.django.app.settings
|
65 | 112 | AWS_SECRET_ACCESS_KEY = fake_key
|
66 | 113 | AWS_ACCESS_KEY_ID=fake_id
|
67 | 114 |
|
68 |
| -[testenv:py35-aiohttp2] |
69 |
| -deps = |
70 |
| - pytest > 3.0.0 |
71 |
| - aiohttp >= 2.3.0,<3.0.0 |
72 |
| - pytest-aiohttp |
73 |
| - botocore |
74 |
| - coverage==4.5.4 |
75 |
| - |
76 | 115 | commands =
|
77 |
| - py{35}: coverage run --source aws_xray_sdk -m py.test tests/ext/aiohttp --ignore tests/ext/aiohttp/test_client.py |
| 116 | + coverage erase |
78 | 117 |
|
79 |
| -[testenv:py36-aiohttp2] |
80 |
| -deps = |
81 |
| - pytest > 3.0.0 |
82 |
| - aiohttp >= 2.3.0,<3.0.0 |
83 |
| - pytest-aiohttp |
84 |
| - botocore |
85 |
| - coverage==4.5.4 |
| 118 | + ; Async methods are only available for python 3.5+ |
| 119 | + py{27,34}-core: coverage run --append --source aws_xray_sdk -m pytest --ignore tests/ext --ignore tests/test_async_local_storage.py --ignore tests/test_async_recorder.py |
| 120 | + py{35,36,37,38,39}-core: coverage run --append --source aws_xray_sdk -m pytest --ignore tests/ext |
86 | 121 |
|
87 |
| -commands = |
88 |
| - py{36}: coverage run --source aws_xray_sdk -m py.test tests/ext/aiohttp --ignore tests/ext/aiohttp/test_client.py |
| 122 | + ext-aiobotocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiobotocore |
89 | 123 |
|
90 |
| -[testenv:py37-aiohttp2] |
91 |
| -deps = |
92 |
| - pytest > 3.0.0 |
93 |
| - aiohttp >= 2.3.0,<3.0.0 |
94 |
| - pytest-aiohttp |
95 |
| - botocore |
96 |
| - coverage==4.5.4 |
| 124 | + ext-aiohttp: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiohttp |
97 | 125 |
|
98 |
| -commands = |
99 |
| - py{37}: coverage run --source aws_xray_sdk -m py.test tests/ext/aiohttp --ignore tests/ext/aiohttp/test_client.py |
| 126 | + ext-botocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/botocore |
100 | 127 |
|
101 |
| -[testenv:py38-aiohttp2] |
102 |
| -deps = |
103 |
| - pytest > 5.2.0 |
104 |
| - aiohttp >= 3.6 |
105 |
| - pytest-aiohttp |
106 |
| - botocore |
107 |
| - coverage==4.5.4 |
| 128 | + ext-bottle: coverage run --append --source aws_xray_sdk -m pytest tests/ext/bottle |
108 | 129 |
|
109 |
| -commands = |
110 |
| - py{38}: coverage run --source aws_xray_sdk -m py.test tests/ext/aiohttp --ignore tests/ext/aiohttp/test_client.py |
| 130 | + ext-django: coverage run --append --source aws_xray_sdk -m pytest tests/ext/django |
111 | 131 |
|
112 |
| -[testenv:coverage-report] |
113 |
| -deps = coverage |
114 |
| -skip_install = true |
115 |
| -commands = |
116 |
| - # might need to add coverage combine at some point |
117 |
| - py{38}: coverage report |
118 |
| - py{38}: coverage html |
| 132 | + ext-flask: coverage run --append --source aws_xray_sdk -m pytest tests/ext/flask |
| 133 | + |
| 134 | + ext-flask_sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/flask_sqlalchemy |
| 135 | + |
| 136 | + ext-httplib: coverage run --append --source aws_xray_sdk -m pytest tests/ext/httplib |
| 137 | + |
| 138 | + ext-pg8000: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pg8000 |
| 139 | + |
| 140 | + ext-psycopg2: coverage run --append --source aws_xray_sdk -m pytest tests/ext/psycopg2 |
| 141 | + |
| 142 | + ext-pymysql: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pymysql |
| 143 | + |
| 144 | + ext-pynamodb: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pynamodb |
| 145 | + |
| 146 | + ext-requests: coverage run --append --source aws_xray_sdk -m pytest tests/ext/requests |
| 147 | + |
| 148 | + ext-sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy |
| 149 | + |
| 150 | + ; sqlalchemy_core - 2.0 style execution is not supported for python 3.4 & 3.5 |
| 151 | + py{27,36,37,38,39}-ext-sqlalchemy_core: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy_core |
| 152 | + py{34,35}-ext-sqlalchemy_core: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy_core --ignore tests/ext/sqlalchemy_core/test_sqlalchemy_core_2.py |
| 153 | + |
| 154 | + ext-sqlite3: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlite3 |
119 | 155 |
|
120 |
| -[flake8] |
121 |
| -max-line-length=120 |
122 |
| -exclude=tests |
| 156 | + ; TODO: add additional logic to combine coverage from "core" and "ext" test runs |
| 157 | + ; codecov |
0 commit comments