|
5 | 5 | "type": "object", |
6 | 6 | "properties": { |
7 | 7 | "ini_options": { |
8 | | - "$ref": "#/definitions/IniOptions", |
| 8 | + "allOf": [ |
| 9 | + { |
| 10 | + "$ref": "#/definitions/IniOptions" |
| 11 | + }, |
| 12 | + { |
| 13 | + "$ref": "#/definitions/IniOptionsAsyncio" |
| 14 | + } |
| 15 | + ], |
9 | 16 | "title": "Bridge Configuration Options for `pytest.ini` File", |
10 | 17 | "description": "The `ini_options` table is used as a bridge between the existing `pytest.ini` configuration system and future configuration formats. `pytest.ini` takes precedence over `[tool.pytest.ini_options]` in `pyproject.toml`." |
11 | 18 | } |
|
14 | 21 | "x-tombi-table-keys-order": "schema", |
15 | 22 | "definitions": { |
16 | 23 | "IniOptions": { |
| 24 | + "$comment": "additionalProperties is true because the schema is merged with other schemas", |
17 | 25 | "type": "object", |
18 | 26 | "properties": { |
19 | 27 | "addopts": { |
|
302 | 310 | "additionalProperties": true, |
303 | 311 | "x-tombi-table-keys-order": "schema" |
304 | 312 | }, |
| 313 | + "IniOptionsAsyncio": { |
| 314 | + "$comment": "additionalProperties is true because the schema is merged with other schemas", |
| 315 | + "description": "Configuration options for pytest-asyncio.\nhttps://pytest-asyncio.readthedocs.io/en/latest/reference/configuration.html", |
| 316 | + "type": "object", |
| 317 | + "properties": { |
| 318 | + "asyncio_default_fixture_loop_scope": { |
| 319 | + "$ref": "#/definitions/AsyncioScope", |
| 320 | + "type": "string", |
| 321 | + "description": "Default event loop scope of asynchronous fixtures. When this configuration option is unset, it defaults to the fixture scope. In future versions of pytest-asyncio, the value will default to function when unset" |
| 322 | + }, |
| 323 | + "asyncio_default_test_loop_scope": { |
| 324 | + "$ref": "#/definitions/AsyncioScope", |
| 325 | + "type": "string", |
| 326 | + "description": "Default event loop scope of asynchronous tests. When this configuration option is unset, it default to function scope", |
| 327 | + "default": "function" |
| 328 | + }, |
| 329 | + "asyncio_mode": { |
| 330 | + "type": "string", |
| 331 | + "oneOf": [ |
| 332 | + { |
| 333 | + "const": "auto", |
| 334 | + "description": "Automatically handling all async functions by the plugin" |
| 335 | + }, |
| 336 | + { |
| 337 | + "const": "strict", |
| 338 | + "description": "Auto processing disabling (useful if different async frameworks should be tested together, e.g. both pytest-asyncio and pytest-trio are used in the same project" |
| 339 | + } |
| 340 | + ], |
| 341 | + "description": "Sets the asyncio mode for pytest-asyncio.", |
| 342 | + "default": "strict" |
| 343 | + } |
| 344 | + }, |
| 345 | + "additionalProperties": true, |
| 346 | + "x-tombi-table-keys-order": "schema" |
| 347 | + }, |
| 348 | + "AsyncioScope": { |
| 349 | + "type": "string", |
| 350 | + "enum": ["function", "class", "module", "package", "session"] |
| 351 | + }, |
305 | 352 | "LogLevel": { |
306 | 353 | "type": "string", |
307 | 354 | "enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] |
|
0 commit comments