Skip to content

TestInfo

Read-only metadata for a discovered test.

Fields

base @ Str [get]

The name the test was registered under, before any parametrize axes are appended. Equal to name for a test without axes.

id @ Str [get]

The test's ID, module/name with the module path's extension removed: the string --filter and --id match.

location @ (inspect.Location | nil) [get]

Where the test function is defined, as given by inspect.definition for the function the first test decorator received, or nil when unknown.

module @ fs.Path [get]

The module containing the test.

name @ Str [get]

The registered test name without normalization.

params @ Tuple[...Tuple[Str, Str]] [get]

The case's parametrize axes as (axis, value) pairs, in the order they appear in the name. Values are given as in the name. Empty for a test without axes.

tags @ Tuple[...Str] [get]

The immutable test tags. Order and duplicates are preserved.