MCPcopy Create free account
hub / github.com/pytest-dev/pytest / store_mark

Function store_mark

src/_pytest/mark/structures.py:388–396  ·  view source on GitHub ↗

Store a Mark on an object. This is used to implement the Mark declarations/decorators correctly.

(obj, mark: Mark)

Source from the content-addressed store, hash-verified

386
387
388def store_mark(obj, mark: Mark) -> None:
389 """Store a Mark on an object.
390
391 This is used to implement the Mark declarations/decorators correctly.
392 """
393 assert isinstance(mark, Mark), mark
394 # Always reassign name to avoid updating pytestmark in a reference that
395 # was only borrowed.
396 obj.pytestmark = [*get_unpacked_marks(obj), mark]
397
398
399# Typing for builtin pytest marks. This is cheating; it gives builtin marks

Callers 1

__call__Method · 0.85

Calls 1

get_unpacked_marksFunction · 0.85

Tested by

no test coverage detected