Skip to content

Properly support set operations for case insensitive multidict views #1038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Mar 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/test_multidict.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,3 +823,14 @@ def test_keys__repr__(self, cls: Type[CIMultiDict[str]]) -> None:
def test_values__repr__(self, cls: Type[CIMultiDict[str]]) -> None:
d = cls([("KEY", "value1")], key="value2")
assert repr(d.values()) == "_ValuesView('value1', 'value2')"

@pytest.mark.xfail(reason="CI sets are not implemented yet")
def test_keys_case_insensitive_union(
self,
cls: Type[CIMultiDict[str]],
) -> None:
d = cls([("KEY", "one"),])

assert "key" in d.keys()
assert d.keys().isdisjoint({"key"})
assert {"key"} & d.keys() == {"KEY"}
Loading