Skip to content

Commit 55b02cf

Browse files
authored
fix(pytest): use correct log level definition (SchemaStore#4612)
The [Pytest documentation](https://docs.pytest.org/en/stable/reference/reference.html#confval-log_level) explains that the `log_level` config variable > Sets the minimum log message level that should be captured for logging > capture. The integer value or the names of the levels can be used. Furthermore, there are more named levels than the ones listed previously: https://github.com/python/cpython/blob/ef06508f8ef1d2943b2fb1e310ab115b65e489a8/Lib/logging/__init__.py#L98-L105 Some are deprecated/not recommended (hence marked as such), but there was also the `NOTSET` option missing previously. Signed-off-by: JP-Ellis <[email protected]>
1 parent 755300e commit 55b02cf

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/schemas/json/partial-pytest.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,22 @@
420420
"enum": ["function", "class", "module", "package", "session"]
421421
},
422422
"LogLevel": {
423-
"type": "string",
424-
"enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
423+
"description": "A minimum log level. Can be level name or integer value.",
424+
"oneOf": [
425+
{
426+
"type": "integer",
427+
"minimum": 0
428+
},
429+
{
430+
"type": "string",
431+
"enum": ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "NOTSET"]
432+
},
433+
{
434+
"type": "string",
435+
"deprecated": true,
436+
"enum": ["FATAL", "WARN"]
437+
}
438+
]
425439
}
426440
}
427441
}

0 commit comments

Comments
 (0)