circuitpython/tests/feature_check/reverse_ops.py
Paul Sokolovsky d6f9d64d97 tests/class_reverse_op: Test for reverse arith ops special methods.
This test should be run only if support for reverse ops is enabled, so
the corresponding feature_check is added to run-tests.
2017-09-10 17:05:57 +03:00

10 lines
117 B
Python

class Foo:
def __radd__(self, other):
pass
try:
5 + Foo()
except TypeError:
print("TypeError")