diff options
author | Damien George <damien.p.george@gmail.com> | 2018-05-11 17:37:16 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-11 17:37:16 +1000 |
commit | 7541be5637c545cbfd8811a6b51e253f9257b833 (patch) | |
tree | b725e95bb4942c70d34f3eee1223ed4f5d2f286a | |
parent | 421b84af9968e582f324899934f52b3df60381ee (diff) | |
download | micropython-7541be5637c545cbfd8811a6b51e253f9257b833.tar.gz micropython-7541be5637c545cbfd8811a6b51e253f9257b833.zip |
tests/basics/special_methods2: Enable some additional tests that work.
These special methods are all available if MICROPY_PY_ALL_SPECIAL_METHODS
is enabled.
-rw-r--r-- | tests/basics/special_methods2.py | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/tests/basics/special_methods2.py b/tests/basics/special_methods2.py index 1a38a250c0..c21618e93d 100644 --- a/tests/basics/special_methods2.py +++ b/tests/basics/special_methods2.py @@ -115,6 +115,13 @@ cud1 / cud2 cud2 // cud1 cud1 += cud2 cud1 -= cud2 +cud1 % 2 +cud1 ** 2 +cud1 | cud2 +cud1 & cud2 +cud1 ^ cud2 +cud1 << 1 +cud1 >> 1 # test that dir() delegates to __dir__ special method print(dir(cud1)) @@ -127,27 +134,6 @@ print('a' in dir(Cud)) # ne is not supported, !(eq) is called instead #cud1 != cud2 # -# binary and is not supported -# cud1 & cud2 -# -# binary lshift is not supported -# cud1<<1 -# -# modulus is not supported -# cud1 % 2 -# -# binary or is not supported -# cud1 | cud2 -# -# pow is not supported -# cud1**2 -# -# rshift is not suported -# cud1>>1 -# -# xor is not supported -# cud1^cud2 -# # in the followin test, cpython still calls __eq__ # cud3=cud1 # cud3==cud1 |