From 540ede34397600794e2979f2ee952bb999496582 Mon Sep 17 00:00:00 2001 From: lovetheguitar Date: Sat, 22 Jun 2024 19:57:05 +0200 Subject: [PATCH] docs(expression.py): describe new `name` & `value` productions --- src/_pytest/mark/expression.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_pytest/mark/expression.py b/src/_pytest/mark/expression.py index 2067110d2..0daaaf22f 100644 --- a/src/_pytest/mark/expression.py +++ b/src/_pytest/mark/expression.py @@ -8,12 +8,15 @@ and_expr: not_expr ('and' not_expr)* not_expr: 'not' not_expr | '(' expr ')' | ident ('(' name '=' value ( ', ' name '=' value )* ')')? ident: (\w|:|\+|-|\.|\[|\]|\\|/)+ +name: a valid ident, but not a reserved keyword +value: (unescaped) string literal | (-)?[0-9]+ | 'False' | 'True' | 'None' The semantics are: - Empty expression evaluates to False. - ident evaluates to True or False according to a provided matcher function. - or/and/not evaluate according to the usual boolean semantics. +- ident with parentheses and keyword arguments evaluates to True or False according to a provided matcher function. """ from __future__ import annotations