diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basics/dict_views.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/basics/dict_views.py b/tests/basics/dict_views.py index 7ebcc1f56d..a82f47b6be 100644 --- a/tests/basics/dict_views.py +++ b/tests/basics/dict_views.py @@ -18,4 +18,22 @@ try: except TypeError: print('TypeError') +# keys dict_view is not hashable + +try: + hash({}.keys()) +except TypeError: + print('TypeError') + +# values dict_view is hashable + +print(type(hash({}.values()))) + +# items dict_view is not hashable + +try: + hash({}.items()) +except TypeError: + print('TypeError') + # set operations still to come |