• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aio-libs / multidict / 34935232442
87%

Build:
DEFAULT BRANCH: master
Ran 15 Sep 2026 06:04AM UTC
Jobs 1
Files 39
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Sep 2026 06:02AM UTC coverage: 87.155% (+1.0%) from 86.148%
34935232442

push

github

web-flow
Add Hypothesis property and stateful fuzz tests (#1460)

<!-- Thank you for your contribution! -->

## What do these changes do?

Adds a Hypothesis-based property and stateful test suite covering
`MultiDict`/`CIMultiDict` core semantics (`add`, `setitem`, `delitem`,
`popone`, `popall`, `popitem`, `setdefault`, `update`, `extend`,
`merge`, `clear`), case-insensitive key folding, proxies, views
(`items`/`keys`/`values` set algebra), the iterator mutation guard,
and a handful of Hypothesis-fuzzed threaded stress scenarios. Split
across four new files (`test_hypothesis_multidict.py`,
`test_hypothesis_views.py`, `test_hypothesis_iters.py`,
`test_hypothesis_concurrency.py`) plus a shared `hypothesis_helpers.py`
with the strategies and a small independent reference model used by
the stateful test. Everything reuses the existing `any_multidict_class`
-style fixtures in `tests/conftest.py`, so each property already runs
against both the C-extension and pure-Python backends and both
case-sensitive and case-insensitive classes.

`update()`/`merge()`'s handling of duplicate keys within a single call
turned out to be more intricate than the docstrings suggest (existing
duplicates are matched positionally against incoming duplicates,
excess incoming ones are appended, excess existing ones are dropped);
the reference model's comments and this description spell out the
exact rule, verified empirically against `tests/test_update.py`'s
existing cases and a few thousand random operation sequences before
being encoded as the oracle.

While fuzzing the iteration guard I found two narrow, real dual-backend
divergences (a pure-Python case where mutating before the first
`next()` call raises `StopIteration` instead of `RuntimeError`, and a
C-extension case where `update()` overwriting an already-existing key
doesn't invalidate live iterators the way `__setitem__` does). Both are
filed as separate follow-ups rather than folded into this test-only
change; the new tests here ar... (continued)

747 of 1494 branches covered (50.0%)

Branch coverage included in aggregate %.

768 of 785 new or added lines in 6 files covered. (97.83%)

6133 of 6400 relevant lines covered (95.83%)

1.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
97.56
tests/test_hypothesis_multidict.py
5
94.31
tests/test_hypothesis_iters.py
3
93.28
tests/test_hypothesis_views.py
1
86.14
0.12% tests/conftest.py
1
99.08
tests/hypothesis_helpers.py
1
94.86
tests/test_hypothesis_concurrency.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 34935232442.1 15 Sep 2026 06:04AM UTC 78
87.15
GitHub Action Run
Source Files on build 34935232442
  • Tree
  • List 39
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34935232442
  • 834ac64d on github
  • Prev Build on master (#34934193414)
  • Next Build on master (#34938049929)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc