Skip to content

docs: replace deprecated py.test command with pytest across docs#1049

Open
TejasAmle wants to merge 1 commit into
taverntesting:masterfrom
TejasAmle:claude/fix-py-test-deprecated-command-in-docs
Open

docs: replace deprecated py.test command with pytest across docs#1049
TejasAmle wants to merge 1 commit into
taverntesting:masterfrom
TejasAmle:claude/fix-py-test-deprecated-command-in-docs

Conversation

@TejasAmle

@TejasAmle TejasAmle commented Jun 2, 2026

Copy link
Copy Markdown

What

Replaces all 14 occurrences of the deprecated py.test command with the current pytest command across the README, example READMEs, and documentation source files.

Why

The py.test entry-point alias was deprecated in pytest 4.0 (released 2018) in favour of the pytest command. Using py.test in docs can confuse new users who follow the official pytest documentation, which exclusively uses pytest.

Files changed

  • README.md – quickstart code block
  • docs/source/basics.md – file path regex example
  • docs/source/debugging.md – debug run example
  • docs/source/examples.md – running tests example
  • docs/source/core_concepts/config.md – global config examples and the note about tavern-ci being an alias for pytest (not py.test)
  • docs/source/core_concepts/external_code.md – PYTHONPATH example
  • docs/source/core_concepts/marks.md – mark filter examples
  • docs/source/core_concepts/types.md – strict mode example
  • example/grpc/README.md – gRPC example instructions
  • example/mqtt/README.md – MQTT example instructions

Verification

After the change, a grep across all .md files returns no remaining py.test occurrences.

Summary by CodeRabbit

  • Documentation
    • Updated documentation examples and Quickstart instructions across multiple README files and core guides to use the current pytest command syntax instead of the deprecated py.test alias. Changes include configuration, debugging, marks, types, external code, and example project documentation.

The py.test command alias has been deprecated in favour of pytest since
pytest 4.0 (2018). Updated all 14 occurrences across README, example
READMEs, and documentation source files to use the current pytest
command instead.
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request updates command-line examples throughout the project documentation to use pytest instead of the deprecated py.test command. The changes affect the main README, core documentation files covering configuration and debugging, and example directory READMEs for gRPC and MQTT integrations.

Changes

py.test to pytest command migration

Layer / File(s) Summary
Core documentation py.test to pytest updates
README.md, docs/source/basics.md, docs/source/core_concepts/config.md, docs/source/core_concepts/external_code.md, docs/source/core_concepts/marks.md, docs/source/core_concepts/types.md, docs/source/debugging.md, docs/source/examples.md
Quickstart and instructional examples in main documentation are updated to invoke pytest instead of py.test when demonstrating command-line test execution with various options (-v, -m, --tavern-file-path-regex, --tavern-global-cfg, --tavern-strict, --tb=short).
Example documentation py.test to pytest updates
example/grpc/README.md, example/mqtt/README.md
Test-running instructions in example directory READMEs are updated to use pytest -v instead of py.test -v.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: replacing deprecated py.test command with pytest across documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@example/grpc/README.md`:
- Line 29: Replace remaining deprecated "py.test" usages with "pytest": update
the test invocation in tox-integration.ini (the entry currently running "py.test
...") to "pytest ..." and update the CLI/help text in tavern/entry.py (the
string that says "py.test --help") to "pytest --help"; ensure you change only
the command text and keep surrounding formatting and arguments intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ec650d2f-3ffc-4a3c-8d60-501f61326baf

📥 Commits

Reviewing files that changed from the base of the PR and between ae12ffb and bf7facf.

📒 Files selected for processing (10)
  • README.md
  • docs/source/basics.md
  • docs/source/core_concepts/config.md
  • docs/source/core_concepts/external_code.md
  • docs/source/core_concepts/marks.md
  • docs/source/core_concepts/types.md
  • docs/source/debugging.md
  • docs/source/examples.md
  • example/grpc/README.md
  • example/mqtt/README.md

Comment thread example/grpc/README.md
2. In another terminal, run the tests:
```bash
py.test -v
pytest -v

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for remaining py.test references in non-markdown files

echo "=== Remaining py.test references in Python files ==="
rg -n 'py\.test' --type=py

echo -e "\n=== Remaining py.test references in config/ini files ==="
rg -n 'py\.test' -g '*.ini' -g '*.cfg'

echo -e "\n=== Remaining py.test references in YAML files ==="
rg -n 'py\.test' --type=yaml

Repository: taverntesting/tavern

Length of output: 457


Update remaining py.test usages in config and CLI help to pytest

  • tox-integration.ini:42 still runs py.test ...; switch to pytest ... to avoid deprecated behaviour and potential breakage.
  • tavern/entry.py:13 still tells users to run py.test --help; update to pytest --help.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@example/grpc/README.md` at line 29, Replace remaining deprecated "py.test"
usages with "pytest": update the test invocation in tox-integration.ini (the
entry currently running "py.test ...") to "pytest ..." and update the CLI/help
text in tavern/entry.py (the string that says "py.test --help") to "pytest
--help"; ensure you change only the command text and keep surrounding formatting
and arguments intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant