tests/basics/special_methods2: Enable some additional tests that work.

These special methods are all available if MICROPY_PY_ALL_SPECIAL_METHODS
is enabled.
pull/3771/merge
Damien George 2018-05-11 17:37:16 +10:00
rodzic 421b84af99
commit 7541be5637
1 zmienionych plików z 7 dodań i 21 usunięć

Wyświetl plik

@ -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