Skip to content

Commit 4b6188b

Browse files
committed
add support for precision bit in LEVEL_NAME_FMT regex
1 parent 634312b commit 4b6188b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ColoredLevelFormatter(logging.Formatter):
5959
logging.DEBUG: {"purple"},
6060
logging.NOTSET: set(),
6161
}
62-
LEVELNAME_FMT_REGEX = re.compile(r"%\(levelname\)([+-.]?\d*s)")
62+
LEVELNAME_FMT_REGEX = re.compile(r"%\(levelname\)([+-.]?\d*[.]?\d*s)")
6363

6464
def __init__(self, terminalwriter: TerminalWriter, *args, **kwargs) -> None:
6565
super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)