
Exclude directories and files from pytest collection
Use explicit ignore paths or directory patterns, and distinguish collection exclusions from deselecting already discovered tests.
Focused answers for definitions, architecture choices, troubleshooting, pricing, and evaluation.

Use explicit ignore paths or directory patterns, and distinguish collection exclusions from deselecting already discovered tests.

Check the selected interpreter and missing module first, then make the project importable through installation or an intentional import-path configuration.

Sort records with a key function, combine multiple fields, choose missing-value behavior, and preserve stable ordering.

Create sorted item lists or dictionaries, handle ties and mixed types, and distinguish insertion order from automatic sorted order.

Use slicing or itertools.batched to process fixed-size groups, validate the chunk size, and distinguish chunk size from number of chunks.

Serve a directory for local testing with http.server, choose the bind address explicitly, and understand version-specific HTTPS support and exposure limits.

Use logger for application output and rsyslog rules for scheduler events, while keeping the job’s exit status visible.

Define explicit mappings and index templates, distinguish template management from dynamic mapping, and handle unknown fields deliberately.

Select tests with paths and node IDs, use keyword expressions for broader matches, and inspect collected IDs before filtering parametrized cases.

Limit a Fluent Bit message field in bytes, preserve valid UTF-8 boundaries, and understand why filtered outputs cannot recover the original message.

Review outdated packages, upgrade a compatible set in an isolated environment, and use a reproducible rebuild instead of assuming a freeze file is a complete rollback.

Use Python string case methods, choose casefold for Unicode-aware comparisons, and avoid surprising title-case and whitespace behavior.