Skip to content

Commit 7541be5

Browse files
committed
tests/basics/special_methods2: Enable some additional tests that work.
These special methods are all available if MICROPY_PY_ALL_SPECIAL_METHODS is enabled.
1 parent 421b84a commit 7541be5

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

‎tests/basics/special_methods2.py‎

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ def __dir__(self):
115115
cud2 // cud1
116116
cud1 += cud2
117117
cud1 -= cud2
118+
cud1 % 2
119+
cud1 ** 2
120+
cud1 | cud2
121+
cud1 & cud2
122+
cud1 ^ cud2
123+
cud1 << 1
124+
cud1 >> 1
118125

119126
# test that dir() delegates to __dir__ special method
120127
print(dir(cud1))
@@ -127,27 +134,6 @@ def __dir__(self):
127134
# ne is not supported, !(eq) is called instead
128135
#cud1 != cud2
129136
#
130-
# binary and is not supported
131-
# cud1 & cud2
132-
#
133-
# binary lshift is not supported
134-
# cud1<<1
135-
#
136-
# modulus is not supported
137-
# cud1 % 2
138-
#
139-
# binary or is not supported
140-
# cud1 | cud2
141-
#
142-
# pow is not supported
143-
# cud1**2
144-
#
145-
# rshift is not suported
146-
# cud1>>1
147-
#
148-
# xor is not supported
149-
# cud1^cud2
150-
#
151137
# in the followin test, cpython still calls __eq__
152138
# cud3=cud1
153139
# cud3==cud1

0 commit comments

Comments
 (0)