pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / limits / only-test-in-memory.patch
blob2dbca193915e02cf24b62848048d51c8c3f6a465
1 diff --git a/tests/aio/test_storage.py b/tests/aio/test_storage.py
2 index 1040d18..deecd9b 100644
3 --- a/tests/aio/test_storage.py
4 +++ b/tests/aio/test_storage.py
5 @@ -95,102 +95,6 @@ class TestBaseStorage:
6 "uri, args, expected_instance, fixture",
8 pytest.param("async+memory://", {}, MemoryStorage, None, id="in-memory"),
9 - pytest.param(
10 - "async+redis://localhost:7379",
11 - {},
12 - RedisStorage,
13 - pytest.lazy_fixture("redis_basic"),
14 - marks=pytest.mark.redis,
15 - id="redis",
16 - ),
17 - pytest.param(
18 - "async+redis+unix:///tmp/limits.redis.sock",
19 - {},
20 - RedisStorage,
21 - pytest.lazy_fixture("redis_uds"),
22 - marks=pytest.mark.redis,
23 - id="redis-uds",
24 - ),
25 - pytest.param(
26 - "async+redis+unix://:password/tmp/limits.redis.sock",
27 - {},
28 - RedisStorage,
29 - pytest.lazy_fixture("redis_uds"),
30 - marks=pytest.mark.redis,
31 - id="redis-uds-auth",
32 - ),
33 - pytest.param(
34 - "async+memcached://localhost:22122",
35 - {},
36 - MemcachedStorage,
37 - pytest.lazy_fixture("memcached"),
38 - marks=pytest.mark.memcached,
39 - id="memcached",
40 - ),
41 - pytest.param(
42 - "async+memcached://localhost:22122,localhost:22123",
43 - {},
44 - MemcachedStorage,
45 - pytest.lazy_fixture("memcached_cluster"),
46 - marks=pytest.mark.memcached,
47 - id="memcached-cluster",
48 - ),
49 - pytest.param(
50 - "async+redis+sentinel://localhost:26379",
51 - {"service_name": "mymaster"},
52 - RedisSentinelStorage,
53 - pytest.lazy_fixture("redis_sentinel"),
54 - marks=pytest.mark.redis_sentinel,
55 - id="redis-sentinel",
56 - ),
57 - pytest.param(
58 - "async+redis+sentinel://localhost:26379/mymaster",
59 - {},
60 - RedisSentinelStorage,
61 - pytest.lazy_fixture("redis_sentinel"),
62 - marks=pytest.mark.redis_sentinel,
63 - id="redis-sentinel-service-name-url",
64 - ),
65 - pytest.param(
66 - "async+redis+sentinel://:sekret@localhost:36379/mymaster",
67 - {"password": "sekret"},
68 - RedisSentinelStorage,
69 - pytest.lazy_fixture("redis_sentinel_auth"),
70 - marks=pytest.mark.redis_sentinel,
71 - id="redis-sentinel-auth",
72 - ),
73 - pytest.param(
74 - "async+redis+cluster://localhost:7001/",
75 - {},
76 - RedisClusterStorage,
77 - pytest.lazy_fixture("redis_cluster"),
78 - marks=pytest.mark.redis_cluster,
79 - id="redis-cluster",
80 - ),
81 - pytest.param(
82 - "async+redis+cluster://:sekret@localhost:8400/",
83 - {},
84 - RedisClusterStorage,
85 - pytest.lazy_fixture("redis_auth_cluster"),
86 - marks=pytest.mark.redis_cluster,
87 - id="redis-cluster-auth",
88 - ),
89 - pytest.param(
90 - "async+mongodb://localhost:37017/",
91 - {},
92 - MongoDBStorage,
93 - pytest.lazy_fixture("mongodb"),
94 - marks=pytest.mark.mongodb,
95 - id="mongodb",
96 - ),
97 - pytest.param(
98 - "async+etcd://localhost:2379",
99 - {},
100 - EtcdStorage,
101 - pytest.lazy_fixture("etcd"),
102 - marks=pytest.mark.etcd,
103 - id="etcd",
104 - ),
107 class TestConcreteStorages:
108 diff --git a/tests/test_storage.py b/tests/test_storage.py
109 index 1b8c7b0..97dcee5 100644
110 --- a/tests/test_storage.py
111 +++ b/tests/test_storage.py
112 @@ -100,110 +100,6 @@ class TestBaseStorage:
113 "uri, args, expected_instance, fixture",
115 pytest.param("memory://", {}, MemoryStorage, None, id="in-memory"),
116 - pytest.param(
117 - "redis://localhost:7379",
118 - {},
119 - RedisStorage,
120 - pytest.lazy_fixture("redis_basic"),
121 - marks=pytest.mark.redis,
122 - id="redis",
123 - ),
124 - pytest.param(
125 - "redis+unix:///tmp/limits.redis.sock",
126 - {},
127 - RedisStorage,
128 - pytest.lazy_fixture("redis_uds"),
129 - marks=pytest.mark.redis,
130 - id="redis-uds",
131 - ),
132 - pytest.param(
133 - "redis+unix://:password/tmp/limits.redis.sock",
134 - {},
135 - RedisStorage,
136 - pytest.lazy_fixture("redis_uds"),
137 - marks=pytest.mark.redis,
138 - id="redis-uds-auth",
139 - ),
140 - pytest.param(
141 - "memcached://localhost:22122",
142 - {},
143 - MemcachedStorage,
144 - pytest.lazy_fixture("memcached"),
145 - marks=pytest.mark.memcached,
146 - id="memcached",
147 - ),
148 - pytest.param(
149 - "memcached://localhost:22122,localhost:22123",
150 - {},
151 - MemcachedStorage,
152 - pytest.lazy_fixture("memcached_cluster"),
153 - marks=pytest.mark.memcached,
154 - id="memcached-cluster",
155 - ),
156 - pytest.param(
157 - "memcached:///tmp/limits.memcached.sock",
158 - {},
159 - MemcachedStorage,
160 - pytest.lazy_fixture("memcached_uds"),
161 - marks=pytest.mark.memcached,
162 - id="memcached-uds",
163 - ),
164 - pytest.param(
165 - "redis+sentinel://localhost:26379",
166 - {"service_name": "mymaster"},
167 - RedisSentinelStorage,
168 - pytest.lazy_fixture("redis_sentinel"),
169 - marks=pytest.mark.redis_sentinel,
170 - id="redis-sentinel",
171 - ),
172 - pytest.param(
173 - "redis+sentinel://localhost:26379/mymaster",
174 - {},
175 - RedisSentinelStorage,
176 - pytest.lazy_fixture("redis_sentinel"),
177 - marks=pytest.mark.redis_sentinel,
178 - id="redis-sentinel-service-name-url",
179 - ),
180 - pytest.param(
181 - "redis+sentinel://:sekret@localhost:36379/mymaster",
182 - {"password": "sekret"},
183 - RedisSentinelStorage,
184 - pytest.lazy_fixture("redis_sentinel_auth"),
185 - marks=pytest.mark.redis_sentinel,
186 - id="redis-sentinel-auth",
187 - ),
188 - pytest.param(
189 - "redis+cluster://localhost:7001/",
190 - {},
191 - RedisClusterStorage,
192 - pytest.lazy_fixture("redis_cluster"),
193 - marks=pytest.mark.redis_cluster,
194 - id="redis-cluster",
195 - ),
196 - pytest.param(
197 - "redis+cluster://:sekret@localhost:8400/",
198 - {},
199 - RedisClusterStorage,
200 - pytest.lazy_fixture("redis_auth_cluster"),
201 - marks=pytest.mark.redis_cluster,
202 - id="redis-cluster-auth",
203 - ),
204 - pytest.param(
205 - "mongodb://localhost:37017/",
206 - {},
207 - MongoDBStorage,
208 - pytest.lazy_fixture("mongodb"),
209 - marks=pytest.mark.mongodb,
210 - id="mongodb",
211 - ),
212 - pytest.param(
213 - "etcd://localhost:2379",
214 - {},
215 - EtcdStorage,
216 - pytest.lazy_fixture("etcd"),
217 - marks=pytest.mark.etcd,
218 - id="etcd",
219 - ),
222 class TestConcreteStorages:
223 diff --git a/tests/utils.py b/tests/utils.py
224 index 558d766..9dcb911 100644
225 --- a/tests/utils.py
226 +++ b/tests/utils.py
227 @@ -52,75 +52,6 @@ all_storage = pytest.mark.parametrize(
228 "uri, args, fixture",
230 pytest.param("memory://", {}, None, id="in-memory"),
231 - pytest.param(
232 - "redis://localhost:7379",
233 - {},
234 - pytest.lazy_fixture("redis_basic"),
235 - marks=pytest.mark.redis,
236 - id="redis_basic",
237 - ),
238 - pytest.param(
239 - "memcached://localhost:22122",
240 - {},
241 - pytest.lazy_fixture("memcached"),
242 - marks=[pytest.mark.memcached, pytest.mark.flaky],
243 - id="memcached",
244 - ),
245 - pytest.param(
246 - "memcached://localhost:22122,localhost:22123",
247 - {},
248 - pytest.lazy_fixture("memcached_cluster"),
249 - marks=[pytest.mark.memcached, pytest.mark.flaky],
250 - id="memcached-cluster",
251 - ),
252 - pytest.param(
253 - "redis+cluster://localhost:7001/",
254 - {},
255 - pytest.lazy_fixture("redis_cluster"),
256 - marks=pytest.mark.redis_cluster,
257 - id="redis-cluster",
258 - ),
259 - pytest.param(
260 - "redis+cluster://:sekret@localhost:8400/",
261 - {},
262 - pytest.lazy_fixture("redis_auth_cluster"),
263 - marks=pytest.mark.redis_cluster,
264 - id="redis-cluster-auth",
265 - ),
266 - pytest.param(
267 - "redis+cluster://localhost:8301",
269 - "ssl": True,
270 - "ssl_cert_reqs": "required",
271 - "ssl_keyfile": "./tests/tls/client.key",
272 - "ssl_certfile": "./tests/tls/client.crt",
273 - "ssl_ca_certs": "./tests/tls/ca.crt",
274 - },
275 - pytest.lazy_fixture("redis_ssl_cluster"),
276 - marks=pytest.mark.redis_cluster,
277 - id="redis-ssl-cluster",
278 - ),
279 - pytest.param(
280 - "redis+sentinel://localhost:26379/mymaster",
281 - {"use_replicas": False},
282 - pytest.lazy_fixture("redis_sentinel"),
283 - marks=pytest.mark.redis_sentinel,
284 - id="redis-sentinel",
285 - ),
286 - pytest.param(
287 - "mongodb://localhost:37017/",
288 - {},
289 - pytest.lazy_fixture("mongodb"),
290 - marks=pytest.mark.mongodb,
291 - id="mongodb",
292 - ),
293 - pytest.param(
294 - "etcd://localhost:2379",
295 - {},
296 - pytest.lazy_fixture("etcd"),
297 - marks=[pytest.mark.etcd, pytest.mark.flaky],
298 - id="etcd",
299 - ),
303 @@ -128,54 +59,6 @@ moving_window_storage = pytest.mark.parametrize(
304 "uri, args, fixture",
306 pytest.param("memory://", {}, None, id="in-memory"),
307 - pytest.param(
308 - "redis://localhost:7379",
309 - {},
310 - pytest.lazy_fixture("redis_basic"),
311 - marks=pytest.mark.redis,
312 - id="redis",
313 - ),
314 - pytest.param(
315 - "redis+cluster://localhost:7001/",
316 - {},
317 - pytest.lazy_fixture("redis_cluster"),
318 - marks=pytest.mark.redis_cluster,
319 - id="redis-cluster",
320 - ),
321 - pytest.param(
322 - "redis+cluster://:sekret@localhost:8400/",
323 - {},
324 - pytest.lazy_fixture("redis_auth_cluster"),
325 - marks=pytest.mark.redis_cluster,
326 - id="redis-cluster-auth",
327 - ),
328 - pytest.param(
329 - "redis+cluster://localhost:8301",
331 - "ssl": True,
332 - "ssl_cert_reqs": "required",
333 - "ssl_keyfile": "./tests/tls/client.key",
334 - "ssl_certfile": "./tests/tls/client.crt",
335 - "ssl_ca_certs": "./tests/tls/ca.crt",
336 - },
337 - pytest.lazy_fixture("redis_ssl_cluster"),
338 - marks=pytest.mark.redis_cluster,
339 - id="redis-ssl-cluster",
340 - ),
341 - pytest.param(
342 - "redis+sentinel://localhost:26379/mymaster",
343 - {"use_replicas": False},
344 - pytest.lazy_fixture("redis_sentinel"),
345 - marks=pytest.mark.redis_sentinel,
346 - id="redis-sentinel",
347 - ),
348 - pytest.param(
349 - "mongodb://localhost:37017/",
350 - {},
351 - pytest.lazy_fixture("mongodb"),
352 - marks=pytest.mark.mongodb,
353 - id="mongodb",
354 - ),
358 @@ -183,75 +66,6 @@ async_all_storage = pytest.mark.parametrize(
359 "uri, args, fixture",
361 pytest.param("async+memory://", {}, None, id="in-memory"),
362 - pytest.param(
363 - "async+redis://localhost:7379",
364 - {},
365 - pytest.lazy_fixture("redis_basic"),
366 - marks=pytest.mark.redis,
367 - id="redis",
368 - ),
369 - pytest.param(
370 - "async+memcached://localhost:22122",
371 - {},
372 - pytest.lazy_fixture("memcached"),
373 - marks=[pytest.mark.memcached, pytest.mark.flaky],
374 - id="memcached",
375 - ),
376 - pytest.param(
377 - "async+memcached://localhost:22122,localhost:22123",
378 - {},
379 - pytest.lazy_fixture("memcached_cluster"),
380 - marks=[pytest.mark.memcached, pytest.mark.flaky],
381 - id="memcached-cluster",
382 - ),
383 - pytest.param(
384 - "async+redis+cluster://localhost:7001/",
385 - {},
386 - pytest.lazy_fixture("redis_cluster"),
387 - marks=pytest.mark.redis_cluster,
388 - id="redis-cluster",
389 - ),
390 - pytest.param(
391 - "async+redis+cluster://:sekret@localhost:8400/",
392 - {},
393 - pytest.lazy_fixture("redis_auth_cluster"),
394 - marks=pytest.mark.redis_cluster,
395 - id="redis-cluster-auth",
396 - ),
397 - pytest.param(
398 - "async+redis+cluster://localhost:8301",
400 - "ssl": True,
401 - "ssl_cert_reqs": "required",
402 - "ssl_keyfile": "./tests/tls/client.key",
403 - "ssl_certfile": "./tests/tls/client.crt",
404 - "ssl_ca_certs": "./tests/tls/ca.crt",
405 - },
406 - pytest.lazy_fixture("redis_ssl_cluster"),
407 - marks=pytest.mark.redis_cluster,
408 - id="redis-ssl-cluster",
409 - ),
410 - pytest.param(
411 - "async+redis+sentinel://localhost:26379/mymaster",
412 - {"use_replicas": False},
413 - pytest.lazy_fixture("redis_sentinel"),
414 - marks=pytest.mark.redis_sentinel,
415 - id="redis-sentinel",
416 - ),
417 - pytest.param(
418 - "async+mongodb://localhost:37017/",
419 - {},
420 - pytest.lazy_fixture("mongodb"),
421 - marks=pytest.mark.mongodb,
422 - id="mongodb",
423 - ),
424 - pytest.param(
425 - "async+etcd://localhost:2379",
426 - {},
427 - pytest.lazy_fixture("etcd"),
428 - marks=[pytest.mark.etcd, pytest.mark.flaky],
429 - id="etcd",
430 - ),
434 @@ -259,53 +73,5 @@ async_moving_window_storage = pytest.mark.parametrize(
435 "uri, args, fixture",
437 pytest.param("async+memory://", {}, None, id="in-memory"),
438 - pytest.param(
439 - "async+redis://localhost:7379",
440 - {},
441 - pytest.lazy_fixture("redis_basic"),
442 - marks=pytest.mark.redis,
443 - id="redis",
444 - ),
445 - pytest.param(
446 - "async+redis+cluster://localhost:7001/",
447 - {},
448 - pytest.lazy_fixture("redis_cluster"),
449 - marks=pytest.mark.redis_cluster,
450 - id="redis-cluster",
451 - ),
452 - pytest.param(
453 - "async+redis+cluster://:sekret@localhost:8400/",
454 - {},
455 - pytest.lazy_fixture("redis_auth_cluster"),
456 - marks=pytest.mark.redis_cluster,
457 - id="redis-cluster-auth",
458 - ),
459 - pytest.param(
460 - "async+redis+cluster://localhost:8301",
462 - "ssl": True,
463 - "ssl_cert_reqs": "required",
464 - "ssl_keyfile": "./tests/tls/client.key",
465 - "ssl_certfile": "./tests/tls/client.crt",
466 - "ssl_ca_certs": "./tests/tls/ca.crt",
467 - },
468 - pytest.lazy_fixture("redis_ssl_cluster"),
469 - marks=pytest.mark.redis_cluster,
470 - id="redis-ssl-cluster",
471 - ),
472 - pytest.param(
473 - "async+redis+sentinel://localhost:26379/mymaster",
474 - {"use_replicas": False},
475 - pytest.lazy_fixture("redis_sentinel"),
476 - marks=pytest.mark.redis_sentinel,
477 - id="redis-sentinel",
478 - ),
479 - pytest.param(
480 - "async+mongodb://localhost:37017/",
481 - {},
482 - pytest.lazy_fixture("mongodb"),
483 - marks=pytest.mark.mongodb,
484 - id="mongodb",
485 - ),