docs(test_parallelization): reflect pytest --command support - #39548
Merged
Conversation
Contributor
Preview links (active after the
|
ddtest PR DataDog/ddtest#123 made PyTest.RunTests and DiscoverTests honor commandOverride (--command / DD_TEST_OPTIMIZATION_RUNNER_COMMAND) instead of hardcoding 'python -m pytest'. Update the configuration and best_practices pages to describe the override and retain PYTEST_ADDOPTS guidance for passing extra flags.
gnufede
force-pushed
the
gnufede/ddtest-docs-update
branch
from
August 28, 2026 09:44
e019c11 to
bd1bde6
Compare
juan-fernandez
approved these changes
Aug 28, 2026
gnufede
marked this pull request as ready for review
September 1, 2026 07:26
Contributor
There was a problem hiding this comment.
More details
The pages state that pytest command overrides require ddtest 1.7.0 or later. They keep PYTEST_ADDOPTS guidance for extra flags.
🤖 Datadog Autotest · Commit bd1bde6 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
hestonhoffman
left a comment
Collaborator
There was a problem hiding this comment.
Left you some edits to replace "since." The word can be a little ambiguous - it can also mean "because" in come contexts, especially at the start of a sentence.
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
hestonhoffman
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? What is the motivation?
Updates the Test Parallelization docs to reflect that since ddtest 1.7.0, Python/pytest honors
--command/DD_TEST_OPTIMIZATION_RUNNER_COMMANDto override the defaultpython -m pytestinvocation. Previously the docs stated pytest ignored--commandand thatPYTEST_ADDOPTSwas the only way to customize the pytest invocation.Motivation: ddtest PR DataDog/ddtest#123 added
commandOverridesupport toPyTest.RunTestsandDiscoverTests.Changes:
configuration.md:DD_TEST_OPTIMIZATION_RUNNER_COMMANDentry, "Custom test commands" pytest paragraph, and "Pytest test discovery" line now describe the override.best_practices.md: "Configure pytest" paragraph now describes the override.PYTEST_ADDOPTSguidance is retained, as it remains valid for passing extra pytest flags without changing the base command.Merge readiness
AI assistance
Used AI to locate the affected doc sections and draft the wording. Reviewed and adjusted manually to follow the Datadog documentation style guide (short sentences, active voice, imperative mood).
Additional notes
Depends on ddtest 1.7.0, which is not yet released. The "since 1.7.0" notes are written to match the upcoming release.