@@ -48,7 +48,20 @@ integration_name: {
4848}
4949```
5050
51- The following can be set as a rule:
51+ ### ` package `
52+
53+ The name of the third party package as it's listed on PyPI. The script will
54+ be picking different versions of this package to test.
55+
56+ This key is mandatory.
57+
58+ ### ` deps `
59+
60+ The test dependencies of the test suite. They're defined as a dictionary of
61+ ` rule: [package1, package2, ...] ` key-value pairs. All packages
62+ in the package list of a rule will be installed as long as the rule applies.
63+
64+ ` rule ` s are predefined. Each ` rule ` must be one of the following:
5265 - ` * ` : packages will be always installed
5366 - a version specifier on the main package (e.g. ` <=0.32 ` ): packages will only
5467 be installed if the main package falls into the version bounds specified
@@ -60,41 +73,50 @@ package's dependencies, for example. If e.g. Flask tests generally need
6073Werkzeug and don't care about its version, but Flask older than 3.0 needs
6174a specific Werkzeug version to work, you can say:
6275
63- ```
76+ ``` python
6477" flask" : {
6578 " deps" : {
6679 " *" : [" Werkzeug" ],
6780 " <3.0" : [" Werkzeug<2.1.0" ],
68- }
69- }
70- ```
71-
72- Sometimes, things depend on the Python version installed. If the integration
73- test should only run on specific Python version, e.g. if you want AIOHTTP
74- tests to only run on Python 3.7+, you can say:
75-
76- ```
77- "aiohttp": {
81+ },
7882 ...
79- "python": ">=3.7",
8083}
8184```
8285
83- If, on the other hand, you need to install a specific version of a secondary
84- dependency on specific Python versions (so the test suite should still run on
85- said Python versions, just with different dependency-of-a-dependency bounds),
86- you can say:
86+ If you need to install a specific version of a secondary dependency on specific
87+ Python versions, you can say:
8788
88- ```
89+ ``` python
8990" celery" : {
90- ...
9191 " deps" : {
9292 " *" : [" newrelic" , " redis" ],
9393 " py3.7" : [" importlib-metadata<5.0" ],
9494 },
95- },
95+ ...
96+ }
97+ ```
98+
99+ ### ` python `
100+
101+ Sometimes, the whole test suite should only run on specific Python versions.
102+ This can be achieved via the ` python ` key, which expects a version specifier.
103+
104+ For example, if you want AIOHTTP tests to only run on Python 3.7+, you can say:
105+
106+ ``` python
107+ " aiohttp" : {
108+ " python" : " >=3.7" ,
109+ ...
110+ }
96111```
97112
113+ Specifying ` python ` is discouraged as the script itself finds out which
114+ Python versions are supported by the package. However, if a package has broken
115+ metadata or the SDK is explicitly not supporting some packages on specific
116+ Python versions (because of, for example, broken context vars), the ` python `
117+ key can be used.
118+
119+
98120## How-Tos
99121
100122### Add a new test suite
0 commit comments