Skip to content

Commit 000afaa

Browse files
committed
tweaks
1 parent 6b165d2 commit 000afaa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/source/changelog.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ Changelog
1515
- ``LMDB`` now uses memory-mapped I/O on MacOSX and is usable on Windows.
1616
(:pr:`78`) `Guido Imperiale`_
1717
- The library is now partially thread-safe.
18-
(:pr:`82`, :pr:`90`) `Guido Imperiale`_
18+
(:pr:`82`, :pr:`90`, :pr:`93`) `Guido Imperiale`_
1919
- :class:`LRU` and :class:`Buffer` now support delayed eviction.
2020
New objects :class:`Accumulator` and :class:`InsertionSortedSet`.
2121
(:pr:`87`) `Guido Imperiale`_
22+
- All mappings now return proper KeysView, ItemsView, and ValuesView objects from their
23+
keys(), items(), and values() methods (:pr:`93`) `Guido Imperiale`_
2224

2325

2426
2.2.0 - 2022-04-28

zict/tests/utils_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import random
22
import string
3-
from collections.abc import MutableMapping
3+
from collections.abc import ItemsView, KeysView, MutableMapping, ValuesView
44

55
import pytest
66

@@ -35,6 +35,9 @@ def check_items(z, expected_items):
3535
assert list(z) == [k for k, v in items]
3636

3737
# ItemsView, KeysView, ValuesView.__contains__()
38+
assert isinstance(z.keys(), KeysView)
39+
assert isinstance(z.values(), ValuesView)
40+
assert isinstance(z.items(), ItemsView)
3841
assert items[0] in z.items()
3942
assert items[0][0] in z.keys()
4043
assert items[0][0] in z

0 commit comments

Comments
 (0)