tests: Split out complex reverse-op tests to separate test file.

So they can be skipped if __rOP__'s are not supported on the target.  Also
fix the typo in the complex_special_methods.py filename.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2020-08-29 14:04:59 +10:00
parent 40d174ac7d
commit 0c7354afaf
3 changed files with 12 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
# test complex interacting with special reverse methods
class A:
def __radd__(self, x):
print("__radd__")
return 2
print(1j + A())

View File

@@ -6,10 +6,5 @@ class A:
print("__add__")
return 1
def __radd__(self, x):
print("__radd__")
return 2
print(A() + 1j)
print(1j + A())