[pytest]
python_files =
    tests/*.py

# Coverage flags intentionally live in the tox [testenv] commands, not
# here, so a bare `pytest -k foo` stays fast. CI enforces the 100% gate
# via tox. `--doctest-modules` still collects progressbar/*.py doctests
# regardless of `python_files` (which only scopes test-module collection).
#
# `python_files` is matched with `fnmatch`, not shell globbing -- its `*`
# matches `/` too, so `tests/*.py` also matches `tests/console/*.py`
# (verified: a bare `pytest --collect-only` at repo root picks up
# tests/console/test_console.py without this ignore). tests/console needs
# `playwright`, which is not part of the default `tests` extra, and
# depends on a docs build existing, so it must stay opt-in -- only
# .github/workflows/docs.yml runs it.
addopts =
    --doctest-modules
    --ignore=tests/console

# scripts and tools are excluded because `--doctest-modules` imports
# every module it collects: scripts/render_demos.py imports fcntl/pty/
# termios at module scope, which does not exist on Windows (the module
# has no doctests, so nothing is lost). tests/test_readme_demos.py
# imports it explicitly behind its own Windows skip guard.
norecursedirs =
    .*
    _*
    build
    benchmarks
    dist
    docs
    progressbar/terminal/os_specific
    scripts
    tmp*
    tools

filterwarnings =
    ignore::DeprecationWarning

markers =
    no_freezegun: Disable automatic freezegun wrapping