diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-17 11:43:47 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-17 11:43:47 +1100 |
commit | e9404e5f5f058db954ac0a92cb5acfcef6f6724a (patch) | |
tree | 6d5ced599e860604aea660de5fb5be1199d29963 /tests/basics/dict1.py | |
parent | 453c2e8f55132d92933f2de0308166730576ecc4 (diff) | |
download | micropython-e9404e5f5f058db954ac0a92cb5acfcef6f6724a.tar.gz micropython-e9404e5f5f058db954ac0a92cb5acfcef6f6724a.zip |
tests: Improve coverage of array, range, dict, slice, exc, unicode.
Diffstat (limited to 'tests/basics/dict1.py')
-rw-r--r-- | tests/basics/dict1.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/basics/dict1.py b/tests/basics/dict1.py index c70ca588a7..21d5af2726 100644 --- a/tests/basics/dict1.py +++ b/tests/basics/dict1.py @@ -16,3 +16,27 @@ while x < 100: d[x] = x x += 1 print(d[50]) + +# equality operator on dicts of different size +print({} == {1:1}) + +# equality operator on dicts of same size but with different keys +print({1:1} == {2:1}) + +# value not found +try: + {}[0] +except KeyError: + print('KeyError') + +# unsupported unary op +try: + +{} +except TypeError: + print('TypeError') + +# unsupported binary op +try: + {} + {} +except TypeError: + print('TypeError') |