Add Hypothesis property-based tests for substitution logic#1424
Open
adamtheturtle wants to merge 3 commits intomainfrom
Open
Add Hypothesis property-based tests for substitution logic#1424adamtheturtle wants to merge 3 commits intomainfrom
adamtheturtle wants to merge 3 commits intomainfrom
Conversation
Closes #1423 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| @settings( | ||
| suppress_health_check=[HealthCheck.function_scoped_fixture], | ||
| ) |
There was a problem hiding this comment.
Missing deadline=None causes flaky Sphinx build tests
Medium Severity
The @settings for both Sphinx build tests suppresses HealthCheck.function_scoped_fixture but doesn't set deadline=None. Hypothesis defaults to a 200ms deadline per example. Each example creates a temp directory, writes files, initializes a SphinxTestApp, runs a full build, and reads HTML output — very likely exceeding 200ms, especially in resource-constrained CI environments. This can cause intermittent DeadlineExceeded failures.
Additional Locations (1)
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.


Summary
hypothesisdependency for property-based testing_apply_substitutionsand flag behavior:{{ }}delimiters work correctly:nosubstitutions:prevents replacement regardless of config:substitutions:forces replacement regardless of configTest plan
Closes #1423
🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adds a dev-only testing dependency and new property-based tests; no runtime code or substitution logic is modified.
Overview
Adds
hypothesisto the dev dependency set and introduces a newtests/test_hypothesis.pysuite of property-based tests.The new tests stress
_apply_substitutionsacross randomized inputs (identity cases, full replacement, MyST{{ }}support, and mixed delimiter pairs) and verify:nosubstitutions:/:substitutions:flags overridesubstitutions_default_enabledwhen building a minimal Sphinx project.Written by Cursor Bugbot for commit 5821c2c. This will update automatically on new commits. Configure here.