Skip to content

Strengthen Settings equality properties - #1333

Open
ryanduguid wants to merge 1 commit into
python-hyper:masterfrom
ryanduguid:test-settings-equality-properties
Open

ryanduguid wants to merge 1 commit into
python-hyper:masterfrom
ryanduguid:test-settings-equality-properties

Conversation

@ryanduguid

Copy link
Copy Markdown

Summary

Strengthen Settings equality properties by replacing repeated comparisons with independently expected results for == and != in both directions. Reuse the existing Hypothesis strategy to cover queued updates, acknowledgements and histories with equal current/final values but different intermediate proposals.

Related to #466. This changes one test file.

Evidence

  • Baseline: 1,662 tests pass with 100% coverage on Linux and Windows Python 3.14.
  • Candidate: 1,664 tests pass with 100% coverage on Linux Python 3.10, 3.11, 3.12, 3.13 and 3.14, and Windows Python 3.14.
  • tox -e py310,py311,py312,py313,py314,lint,docs passes, including Ruff, mypy and the documentation build.
  • Four local mutations all pass the four original equality tests. The revised tests reject comparisons that ignore pending values, compare only queue endpoints, treat all settings as equal or claim a settings object differs from itself. They produce 2, 2, 3 and 3 failures respectively.
  • All six equality properties also pass with Hypothesis seeds 17, 466 and 20261008.

Merge danger

Reversible test-only change. The assertions protect the existing behaviour that pending proposals are part of equality, even before acknowledgement.

Unverified

The packaging and h2spec environments, macOS, PyPy and other Windows Python versions were not run. The isolated Linux source snapshot excludes the bundled TLS certificate/key fixtures. Hosted CI and Codecov upload remain unverified.

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