ErrLookup › pytest-dev/pytest
pytest-dev/pytest
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing · Python · 212 source files
Analyzed at 98b357f69e on 2026-08-04. 183 documented errors.
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| PYTEST_THEME environment variable has an invalid value: '{th | validation | error | config, environment-variable, pygments, terminal |
| PYTEST_THEME_MODE environment variable has an invalid value: | validation | error | config, environment-variable, pygments, terminal |
| {optname} must be a filename, given: {path} | validation | error | config, cli, argparse, filesystem |
| {optname} must be a directory, given: {path} | validation | error | config, cli, argparse, filesystem |
| `args` parameter expected to be a list of strings, got: {!r} | exception | error | api, type-error, programmatic-invocation |
| plugin {name} cannot be disabled | validation | error | config, cli, plugins, usage-error |
| Blocking conftest files using -p is not supported: -p no:{na | validation | error | config, cli, plugins, conftest, usage-error |
| Error importing plugin "{modname}": {e.args[0]} | exception | error | plugins, import-error, dependency, startup |
| Plugins may be specified as a sequence or a ','-separated st | validation | error | config, plugins, type-error, usage-error |
| Missing required plugins: {} | validation | error | config, plugins, dependency, version-mismatch, usage-error |
| expected module names as *args, got {0} instead | exception | error | api, type-error, assertion-rewrite |
| name is not allowed to contain path separators | exception | error | api, cache, filesystem, value-error, validation |
| approx() is not supported in a boolean context. Did you mean | exception | error | approx, assertion, api-misuse, assertion-error |
| cannot compare '{actual}' to numpy.ndarray | exception | error | approx, numpy, type-error, comparison |
| pytest.approx() does not support nested dictionaries: key={! | exception | error | approx, dict, type-error, nested-structures |
| pytest.approx() does not support nested data structures: {!r | exception | error | approx, sequence, type-error, nested-structures, numpy |
| relative tolerance for a scalar value must be an int, float | exception | error | approx, type-error, tolerance, validation |
| expected value must support abs(...) when relative tolerance | exception | error | approx, type-error, tolerance, validation |
| absolute tolerance for a scalar value must be an int, float | exception | error | approx, type-error, tolerance, validation |
| absolute tolerance can't be negative: {absolute_tolerance} | exception | error | approx, tolerance, value-error, validation |
| absolute tolerance can't be NaN. | exception | error | pytest, approx, validation, nan |
| relative tolerance can't be negative: {relative_tolerance} | exception | error | pytest, approx, validation |
| relative tolerance can't be NaN. | exception | error | pytest, approx, nan, validation |
| pytest.approx() does not support relative tolerance for date | exception | error | pytest, approx, datetime |
| pytest.approx() does not support nan_ok for datetime/timedel | exception | error | pytest, approx, datetime |
| pytest.approx() requires an explicit tolerance for datetime/ | exception | error | pytest, approx, datetime |
| absolute tolerance for datetime/timedelta must be a timedelt | exception | error | pytest, approx, datetime, type-mismatch |
| absolute tolerance can't be negative: {abs} | exception | error | pytest, approx, datetime, validation |
| relative tolerance for timedelta must be a number, got {type | exception | error | pytest, approx, timedelta, type-mismatch |
| relative tolerance can't be negative: {rel} | exception | error | pytest, approx, timedelta, validation |
| relative tolerance can't be infinite. | exception | error | pytest, approx, timedelta, validation |
| pytest.approx() only supports ordered sequences, but got: {e | exception | error | pytest, approx, type-mismatch, collections |
| pytest: reading from stdin while output is captured! Consid | exception | error | pytest, capture, stdin, io |
| redirected stdin is pseudofile, has no fileno() | exception | error | pytest, capture, stdin, io |
| redirected stdin is pseudofile, has no flush() | exception | warning | pytest, capture, stdin, io |
| redirected stdin is pseudofile, has no seek(int) | exception | warning | pytest, capture, stdin, io |
| redirected stdin is pseudofile, has no tell() | exception | warning | pytest, capture, stdin, io |
| cannot truncate stdin | exception | warning | pytest, capture, stdin, io |
| cannot write to stdin | exception | error | capture, stdin, unsupported-operation, pytest |
| Cannot write to stdin | exception | error | capture, stdin, writelines, unsupported-operation, pytest |
| unknown capturing method: {method!r} | exception | error | capture, cli, invalid-argument, pytest |
| unknown configuration value: {name!r} | exception | error | config, ini, getini, pytest |
| {self.inipath}: config option '{name}' expects one of {_ini_ | exception | error | config, ini, toml, union-type, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects a string, got | exception | error | config, ini, toml, literal-choice, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects one of {_ini_ | exception | error | config, ini, choices, invalid-value, pytest |
| Expected an int string for option {name} of type integer, bu | exception | error | config, ini, int-coercion, type-mismatch, pytest |
| Expected a float string for option {name} of type float, but | exception | error | config, ini, float-coercion, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects a list for ty | exception | error | config, toml, paths, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects a list of str | exception | error | config, toml, paths, list-item-type, pytest |
| {self.inipath}: config option '{name}' expects a list for ty | exception | error | config, toml, args, linelist, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects a bool, got { | exception | error | config, toml, bool, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects an int, got { | exception | error | config, toml, int, bool-vs-int, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects a float, got | exception | error | config, toml, float, type-mismatch, pytest |
| {self.inipath}: config option '{name}' expects a string, got | exception | error | config, toml, string, type-mismatch, pytest |
| no option named {name!r} | exception | error | config, getoption, cli-option, pytest |
| invalid truth value {val!r} | exception | error | config, ini, bool, strtobool, invalid-value, pytest |
| while parsing the following warning configuration: {arg} | exception | error | config, warnings, filterwarnings, cli, invalid-argument, pytest |
| number is negative | exception | error | pytest, config, warnings, filterwarnings, validation |
| invalid lineno {lineno_!r}: {e} | exception | error | pytest, config, warnings, filterwarnings, validation |
| Invalid regex {e.pattern!r}: {e} | exception | error | pytest, config, warnings, filterwarnings, regex, validation |
| {cat} is not a Warning subclass | exception | error | pytest, config, warnings, filterwarnings, type-check, usage-error |
| invalid type for ini option {name!r}: {type_!r} (expected on | exception | error | pytest, plugin, config, addini, type-check, api-misuse |
| invalid type for ini option {name!r}: Literal choices must b | exception | error | pytest, plugin, config, addini, literal, type-check |
| ini option {name!r} has a {kind} type, which has no implicit | exception | error | pytest, plugin, config, addini, literal, union, default |
| alias {alias!r} conflicts with existing configuration option | exception | error | pytest, plugin, config, addini, alias, naming-conflict |
| {alias!r} is already an alias of {already!r} | exception | error | pytest, plugin, config, addini, alias, naming-conflict |
| option names {conflict} already added | exception | error | pytest, plugin, config, addoption, naming-conflict, cli |
| option dest {dest!r} already used by {option.names()!r} (thi | exception | error | pytest, plugin, config, addoption, argparse, dest, cli |
| lowercase short options are reserved | exception | error | pytest, plugin, config, addoption, cli, naming-convention |
| {filepath}: {exc} | exception | error | pytest, config, toml, pyproject, parsing, usage-error |
| {filepath}: pytest configuration must be under a [pytest] ta | exception | error | pytest, config, toml, pyproject, config-structure, usage-error |
| {filepath}: Cannot use both [tool.pytest] (native TOML types | exception | error | pytest, config, toml, pyproject, config-structure, migration, usage-error |
| -o/--override-ini expects option=value style (got: {ini_conf | exception | error | pytest, config, cli, override-ini, usage-error |
| Directory '{rootdir}' not found. Check your '--rootdir' opti | exception | error | pytest, config, cli, rootdir, filesystem, usage-error |
| --pdbcls: could not import {value!r}: {exc} | exception | error | pytest, debugging, cli, pdbcls, import, usage-error |
| function not available in {self.scope}-scoped context | exception | error | pytest, fixtures, scope, attributeerror |
| cls not available in {self.scope}-scoped context | exception | error | pytest, fixtures, scope, attributeerror |
| module not available in {self.scope}-scoped context | exception | error | pytest, fixtures, scope, attributeerror |
| path not available in {self.scope}-scoped context | exception | error | pytest, fixtures, scope, attributeerror, path |
| The fixture value for "{argname}" is not available during te | exception | error | pytest, fixtures, teardown, getfixturevalue, deprecation |
| {request.fixturename} did not yield a value | exception | error | pytest, fixtures, generator, yield, valueerror |
| Error evaluating {scope_callable} while defining fixture '{f | exception | error | pytest, fixtures, dynamic-scope, signature, typeerror |
| errors while tearing down fixture "{self.argname}" of {node} | exception | error | pytest, fixtures, teardown, exceptiongroup |
| class fixtures not supported (maybe in the future) | exception | error | pytest, fixtures, class-fixture, valueerror |
| @pytest.fixture is being applied more than once to the same | exception | error | pytest, fixtures, decorator, valueerror |
| help argument cannot be None for {name} | exception | error | pytest, config, plugin, help, addini, typeerror |
| {param} parameter needs to be a string, but {g} given | exception | error | pytest, junitxml, record-property, typeerror |
| unknown configuration type: {type} | exception | error | pytest, config, legacypath, ini, valueerror |
| '{log_level}' is not recognized as a logging level name for | exception | error | pytest, logging, config, usageerror |
| path cannot contain [] parametrization: {arg} | exception | error | pytest, collection, cli, parametrization, usageerror |
| module or package not found: {arg} (missing __init__.py?) | exception | error | pytest, collection, pyargs, import, usageerror |
| file or directory not found: {arg} | exception | error | pytest, collection, cli, filesystem, usageerror |
| package argument cannot contain :: selection parts: {arg} | exception | error | pytest, collection, pyargs, cli, usageerror |
| directory argument cannot contain :: selection parts: {arg} | exception | error | pytest, collection, cli, directory, usageerror |
| Keyword expressions do not support call parameters. | exception | error | pytest, keyword-filter, cli, markers, usageerror |
| {exc_message}: {e.text}: at column {e.offset}: {e.msg} | exception | error | pytest, marker-expression, cli, usage-error |
| closing quote "{quote_char}" is missing | exception | error | pytest, marker-expression, scanner, quoting |
| escaping with "\" not supported in marker expression | exception | error | pytest, marker-expression, scanner, escaping |
| unexpected character "{input[pos]}" | exception | error | pytest, marker-expression, scanner, invalid-character |
| expected {}; got {} | exception | error | pytest, marker-expression, parser, syntax |
| not a valid python identifier {keyword_name.value} | exception | error | pytest, marker-expression, kwargs, identifier |
| unexpected reserved python keyword `{keyword_name.value}` | exception | error | pytest, marker-expression, kwargs, reserved-keyword |
| unexpected character/s "{value_token.value}" | exception | error | pytest, marker-expression, kwargs, invalid-value |
| Empty parameter set in '{func.__name__}' at line {lineno + 1 | exception | error | pytest, parametrize, collection, config |
| pytest.param cannot add pytest.mark.usefixtures; see https:/ | validation | error | pytest, parametrize, usefixtures, api-restriction |
| Expected id to be a string or a `pytest.HIDDEN_PARAM` sentin | validation | error | pytest, parametrize, type-error, id |
| got {mark_obj!r} instead of Mark | validation | error | pytest, marks, type-error, normalize |
| Marker name must NOT start with underscore | exception | error | pytest, marks, attribute-error, naming |
| cannot delete key in keywords dict | validation | error | pytest, keywords, immutable, hooks |
| import error in {used}: {ex} | exception | error | pytest, monkeypatch, import, setattr |
| {type(obj).__name__!r} object at {ann} has no attribute {nam | exception | error | pytest, monkeypatch, attribute-error, setattr |
| must be absolute import path string, not {import_path!r} | validation | error | pytest, monkeypatch, type-error, import-path |
| use setattr(target, name, value) or setattr(target, value) w | validation | error | pytest, monkeypatch, type-error, setattr, api-usage |
| use setattr(target, name, value) with name being a string or | validation | error | pytest, monkeypatch, type-error, setattr, api-usage |
| {target!r} has no attribute {name!r} | exception | error | pytest, monkeypatch, attribute-error, setattr |
| use delattr(target, name) or delattr(target) with target bei | validation | error | monkeypatch, api-misuse, pytest, delattr |
| {name} | exception | error | monkeypatch, attribute, pytest, delattr |
| config or parent must be provided | validation | error | nodes, plugin-api, pytest, constructor |
| session or parent must be provided | validation | error | nodes, plugin-api, pytest, constructor |
| nodeid or parent must be provided | validation | error | nodes, plugin-api, pytest, nodeid |
| config is not a valid argument for from_parent | validation | error | nodes, plugin-api, pytest, from-parent |
| session is not a valid argument for from_parent | validation | error | nodes, plugin-api, pytest, from-parent |
| warning must be an instance of Warning or subclass, got {war | validation | error | nodes, warnings, pytest, type-check |
| is not a string or pytest.mark.* Marker | validation | error | nodes, markers, pytest, type-check |
| runtest must be implemented by Item subclass | exception | critical | nodes, plugin-api, pytest, abstract, item |
| {} expected string as 'msg' parameter, got '{}' instead. Per | validation | error | outcomes, skip, xfail, pytest, type-check |
| module {modname!r} has __version__ {verattr!r}, required is: | exception | warning | outcomes, importorskip, version, pytest, skip |
| could not create numbered dir with prefix {prefix} in {root} | exception | critical | pathlib, cache, filesystem, permissions, pytest |
| cannot create lockfile in {p} | exception | error | pathlib, cache, lock, filesystem, pytest |
| lock path got renamed after successful creation | exception | error | pathlib, cache, lock, race-condition, pytest |
| {path} | exception | critical | pathlib, import, filesystem, pytest |
| Can't find module {module_name} at location {path} | exception | critical | pathlib, import, import-mode, package, pytest |
| {module_name}, {module_file}, {path} | exception | error | pathlib, import, import-mismatch, package, pytest |
| Could not resolve for {path} | exception | error | python, path-resolution, packaging, collection |
| could not find test report matching {inamepart!r}: no test r | validation | error | pytester, test-reports, assertion |
| found 2 or more testreports matching {inamepart!r}: {values} | validation | error | pytester, test-reports, assertion |
| Pytest terminal summary report not found | validation | error | pytester, output-parsing, assertion |
| ext must not be None | validation | error | pytester, file-creation, validation |
| pytester.makefile expects a file extension, try .{ext} inste | validation | error | pytester, file-creation, validation |
| pytester_example_dir is unset, can't copy examples | validation | error | pytester, configuration, examples |
| {func_name} can't be found as module or package in {example_ | exception | error | pytester, examples, file-not-found |
| example "{example_path}" is not found as a file or directory | exception | error | pytester, examples, file-not-found |
| Unrecognized runpytest option: {self._method} | exception | error | pytester, internal, configuration |
| Specifying plugins as objects is not supported in pytester s | validation | error | pytester, subprocess, plugins |
| line {fnline!r} not found in output | validation | error | pytester, output-parsing, assertion |
| invalid type for lines2: {type(lines2).__name__} | validation | error | pytester, type-validation, assertion |
| Unknown parametrize_long_str_id_strategy: {value!r}. Valid v | exception | error | configuration, parametrize, validation |
| {nodeid}: error raised while trying to determine id of param | validation | error | parametrize, ids, user-callback |
| {name} | validation | error | parametrize, internal, lookup |
| ids must be a callable or an iterable | validation | error | parametrize, ids, type-validation |
| function definitions are not supposed to be run as tests | exception | error | internal, collection, runtest |
| module {__name__!r} has no attribute {name!r} | exception | error | internal, import, attribute-access |
| Unexpected keyword arguments passed to pytest.raises: {kwarg | validation | error | pytest-raises, api-misuse, validation |
| Expected an exception type or a tuple of exception types, bu | validation | error | pytest, raises, validation, api-misuse |
| {func!r} object (type: {type(func)}) must be callable | validation | error | pytest, raises, validation, callable |
| Only `ExceptionGroup[Exception]` or `BaseExceptionGroup[Base | validation | error | pytest, raises, exception-group, validation |
| Expected {expected}, but got {exc.__name__!r} | validation | error | pytest, raises, validation, type-check |
| Expected {expected}, but got an exception instance: {type(ex | validation | error | pytest, raises, validation, type-check |
| You must specify at least one parameter to match on. | validation | error | pytest, raises, validation |
| {fail_reason} | exception | error | pytest, raises, assertion, regex |
| You cannot specify multiple exceptions with `allow_unwrapped | validation | error | pytest, raises-group, validation |
| `allow_unwrapped=True` has no effect when expecting a `Raise | validation | error | pytest, raises-group, validation |
| `allow_unwrapped=True` bypasses the `match` and `check` para | validation | error | pytest, raises-group, validation |
| You cannot specify a nested structure inside a RaisesGroup w | validation | error | pytest, raises-group, validation |
| Expected {expected}, but got {type(exc).__name__!r}. RaisesG | validation | error | pytest, raises-group, validation |
| Unexpected keyword arguments passed to pytest.warns: {argnam | validation | error | pytest, warns, validation |
| {func!r} object (type: {type(func)}) must be callable | validation | error | pytest, warns, validation, callable |
| {cls!r} not found in warning list | exception | error | pytest, warns, assertion |
| Cannot enter {self!r} twice | exception | error | pytest, warns, context-manager, runtime |
| Cannot exit {self!r} without entering first | exception | error | pytest, warns, context-manager, runtime |
| exceptions must be derived from Warning, not %s | validation | error | pytest, warns, validation, type-check |
| Warning must be str or Warning, got {msg!r} (type {type(msg) | validation | error | pytest, warns, validation, type-check |
| {self!r} has no valid result | exception | error | plugin-api, callinfo, internal-api, pytest-runner |
| errors during test teardown | exception | error | teardown, fixtures, exceptiongroup, pytest-runner |
| pytest_markeval_namespace() needs to return a dict, got {dic | validation | error | marks, skipif, xfail, hooks, markeval |
| {str(e)} - maybe you meant pytest.mark.skipif? | validation | error | marks, skip, skipif, user-error |
| multiple thread exception warnings | exception | warning | threads, exceptiongroup, teardown, concurrency |
| tmp_path_retention_count must be >= 0. Current input: {count | validation | error | config, tmpdir, ini, validation |
| {basename} is not a normalized and relative path | validation | error | tmpdir, path-traversal, validation, security |
| The temporary directory {rootdir} is a symbolic link. Fix th | exception | error | tmpdir, symlink, security, toctou, filesystem |
| The temporary directory {rootdir} is not owned by the curren | exception | error | tmpdir, ownership, security, filesystem, permissions |
| Unittest class cleanup errors | exception | error | unittest, teardown, exceptiongroup, class-cleanup |
| multiple unraisable exception warnings | exception | warning | unraisable, gc, exceptiongroup, teardown, resources |